Skip to content
Statculator
P-Values & Critical Values

P-Value from Chi-Square Calculator

Free chi-square p-value calculator. Enter χ² and df to get the right-, left- or two-tailed p-value, the decision at your α, a shaded curve and every step.

Free, no sign-up Runs in your browserBy Hira Noor, BS MathematicsUpdated

Try

k − 1 for goodness of fit, (r − 1)(c − 1) for independence, n − 1 for one variance.

Tail

Goodness-of-fit and independence tests are always right-tailed. Left and two-tailed are for tests about one variance.

Leave blank to get the p-value without a decision.

Results

p-value (right-tailed)
0.0396
p = P(χ² ≥ 10.05), df = 4
Critical χ² at α = 0.05
9.4877

Significant at α = 0.05: reject H₀

p = 0.0396 ≤ 0.05. Reject H₀ if χ² ≥ 9.4877, and the observed χ² is 10.05.

Right tail, P(χ² ≥ x)
0.0396
Left tail, P(χ² ≤ x)
0.9604
Two-tailed, 2 × smaller tail
0.0792
Degrees of freedom
4
Mean of χ²(df) = df
4
Standard deviation, √(2·df)
2.8284
χ² / df
2.5125

Interpretation: If H₀ is true, a χ² statistic of 10.05 or more would turn up about once in every 25 repetitions with 4 degrees of freedom. A χ²(4) variable averages 4, so the observed value is 2.51 times its expected size.

chi2 distribution curve with the shaded probability region, markers at χ² = 10.05χ² = 10.05024681012141618Chi-square distribution, df = 4
Shaded area = p-value = 0.0396. Dashed line: your χ² statistic.

Decision at common significance levels (right-tailed, df = 4)

αCritical χ²Reject H₀?
0.17.7794Yes
0.059.4877Yes
0.02511.1433No
0.0113.2767No
0.00514.8603No
0.00118.4668No

p = 0.0396. “Yes” means p ≤ α, the same as χ² falling in the rejection region.

Step-by-step solution

  1. 1

    Write the p-value as a probability

    Large χ² values are evidence against H₀, so the p-value is the area to the right of the statistic under the χ² curve with 4 df.

    p = P(χ² ≥ 10.05), χ² ~ χ²(4)
  2. 2

    Evaluate the chi-square CDF

    The CDF of a χ² variable is the regularized lower incomplete gamma function with shape df/2, evaluated at χ²/2.

    P(χ² ≤ 10.05) = γ(2, 5.025) / Γ(2) = 0.960406
  3. 3

    Find the upper-tail area

    P(χ² ≥ 10.05) = 1 − 0.960406 = 0.039594
  4. 4

    Read off the p-value

    The p-value is the upper-tail area.

    p = 0.0396
  5. 5

    Decision: reject H₀

    p = 0.0396 ≤ α = 0.05
    Reject H₀ if χ² ≥ 9.4877; observed χ² = 10.05

What is a P-Value from Chi-Square Calculator?

A p-value from chi-square calculator turns a χ² statistic and its degrees of freedom into a p-value. For goodness-of-fit and independence tests the p-value is the area to the right of χ² under the chi-square curve, because only large values signal a poor fit: χ² = 10.05 with df = 4 gives p = 0.0396, which is significant at α = 0.05. Left-tailed and two-tailed p-values are available for tests about a single variance.

What the P-Value from Chi-Square Calculator does

Enter a chi-square statistic and its degrees of freedom to get the right-tail, left-tail and two-tailed p-values, the critical value at your α, the reject or fail-to-reject decision, and a χ² curve with the p-value area shaded. A table shows whether the result is significant at each common α level, and the steps show the incomplete-gamma calculation with your numbers. It works as a chi-square p-value calculator, a chi-square to p-value converter or a p-value calculator for a chi-square test: the input is always χ² and df.

Use it after computing χ² by hand, or when software or a textbook reports the statistic without its p-value: goodness-of-fit tests, tests of independence or homogeneity in a contingency table, likelihood-ratio (G) tests, McNemar’s test and tests about one population variance. For variance tests you can switch to a left-tailed or two-tailed p-value.

How to use the P-Value from Chi-Square Calculator

  1. Enter the Chi-square statistic (χ²). It can never be negative.
  2. Enter the Degrees of freedom (df): k − 1 for k categories (minus one more per estimated parameter), (r − 1)(c − 1) for an r × c table, or n − 1 for a variance test. The Degrees of Freedom Calculator works it out if you are unsure.
  3. Leave Tail on Right for goodness-of-fit and independence tests. Choose Left or Two-tailed only for a test about a variance.
  4. Optionally enter Significance level (α) and read the p-value, decision and shaded curve.

How to calculate the p-value from chi-square

To find the p-value from a chi-square statistic (often typed as x² or chi2) you need χ², the degrees of freedom and the direction of the test. The p-value is the probability that a χ²(df) variable is at least as large as the value you observed, assuming H₀ is true.

  1. Compute the statistic. For counts, χ² = Σ (O − E)² / E over every cell or category.
  2. Work out df. Goodness of fit: categories − 1 − estimated parameters. Independence in an r × c table: (r − 1)(c − 1). One variance: n − 1.
  3. Find the right-tail area. p = P(χ² ≥ your value) = 1 − CDF. A calculator or software gives it exactly. With a printed chi-square table, find your df row and the two columns your χ² falls between; the p-value lies between their tail areas (for example 0.025 < p < 0.05).
  4. By hand for even df. When df is even the tail area has a closed form: p = e^(−χ²/2) × Σ (χ²/2)ⁱ / i!, summed from i = 0 to df/2 − 1. For df = 2 this is simply p = e^(−χ²/2); χ² = 3.2 gives p = e^(−1.6) = 0.2019.
  5. Compare with α. If p ≤ α, reject H₀. If p > α, fail to reject H₀.

Chi-square p-value table

Right-tail p-values for a few chi-square statistics and degrees of freedom. Read across from your df to the χ² nearest your statistic; for an exact value enter it in the calculator above. The same χ² is far less significant at higher df, because the mean of a χ²(df) variable is df.

Right-tail p-value, P(χ² ≥ x), by df
dfχ² = 2χ² = 4χ² = 6χ² = 8χ² = 10χ² = 15χ² = 20
10.15730.04550.01430.00470.00160.00010.000008
20.36790.13530.04980.01830.00670.00060.000045
30.57240.26150.11160.04600.01860.00180.0002
40.73580.40600.19910.09160.04040.00470.0005
50.84910.54940.30620.15620.07520.01040.0012
60.91970.67670.42320.23810.12470.02030.0028
80.98100.85710.64720.43350.26500.05910.0103
100.99630.94730.81530.62880.44050.13210.0293

Chi-square p-value formula

The chi-square CDF with k degrees of freedom is a regularized incomplete gamma function. Every p-value below is built from it.

Right-tailed (goodness of fit, independence)
p = P(χ² ≥ x) = 1 − γ(k/2, x/2) / Γ(k/2)
Left-tailed (variance smaller than claimed)
p = P(χ² ≤ x) = γ(k/2, x/2) / Γ(k/2)
Two-tailed (variance different from claimed)
p = 2 × min{ P(χ² ≤ x), P(χ² ≥ x) }
Statistic for a goodness-of-fit test
χ² = Σ (Oᵢ − Eᵢ)² / Eᵢ
Formula symbols
SymbolMeaning
xobserved chi-square statistic
k (df)degrees of freedom, any positive number
γ(a, z)lower incomplete gamma function
Oᵢ, Eᵢobserved and expected counts in category i

The two-tailed rule doubles the smaller tail because the χ² curve is skewed: equal areas in each tail do not sit at equal distances from the centre. This is the equal-tail convention that matches the usual two-sided confidence interval for a variance.

The distribution follows the NIST/SEMATECH e-Handbook definition of the chi-square distribution. Critical values here agree with its table of chi-square critical values, and the p-values match R’s pchisq and SciPy’s chi2.sf.

Worked example

Worked example: customers by weekday

Problem. A shop expects customers to be spread evenly over five weekdays. Of 200 customers, it counts 55, 30, 34, 45 and 36 on Monday to Friday. Is the spread uneven at α = 0.05?

  1. 01Expected count per day: 200 / 5 = 40.
  2. 02χ² = (15² + 10² + 6² + 5² + 4²) / 40 = (225 + 100 + 36 + 25 + 16) / 40 = 402 / 40 = 10.05.
  3. 03df = k − 1 = 5 − 1 = 4, and the test is right-tailed.
  4. 04df is even, so p = e^(−5.025) × (1 + 5.025) = 0.006572 × 6.025 = 0.0396. The CDF route gives the same: γ(2, 5.025) / Γ(2) = 0.960406 and 1 − 0.960406 = 0.0396.
  5. 05The critical value for α = 0.05 with 4 df is 9.4877, and 10.05 > 9.4877.

Answer. p ≈ 0.0396 < 0.05, so reject H₀: customer numbers are not evenly spread across the week. Monday, with 15 more customers than expected, contributes most of the χ².

What the p-value in a chi-square test means

Yes, every chi-square test has a p-value. It is the probability of getting a χ² statistic at least as large as the one observed if the null hypothesis were true: for a goodness-of-fit test, that the counts follow the claimed proportions; for a test of independence, that the two variables are unrelated.

The 0.05 in a chi-square test is the significance level α, the false-positive rate you accept. A p-value of 0.05 or less means a statistic this large would turn up in at most 5% of samples if H₀ were true, so you reject H₀ and call the result statistically significant. For df = 1 that happens once χ² reaches 3.841; for df = 4, once it reaches 9.488.

A large p-value, such as χ² = 0.814 with df = 5 (p = 0.9761), means the counts are close to what H₀ predicts. It does not prove H₀ is true. A small p-value says the data depart from H₀ somewhere, not where or by how much, so check the individual (O − E)² / E contributions and an effect size such as Cramér’s V.

Judging χ² against its degrees of freedom

A chi-square variable with df degrees of freedom has mean df and standard deviation √(2·df). So a χ² close to its df is unremarkable, while a χ² about twice its df is significant only once df is moderately large. The table shows the right-tail p-value in both situations.

dfp when χ² = dfp when χ² = 2 × df
10.31730.1573
20.36790.1353
50.41590.0752
100.44050.0293
200.45790.0050
500.47340.000035

When is a chi-square test left-tailed or two-tailed?

Goodness-of-fit and independence statistics add up squared differences between observed and expected counts, so any departure from H₀ makes χ² bigger. Only the right tail counts as evidence, and a two-tailed p-value would be wrong for these tests.

The test of a single variance is different. Its statistic χ² = (n − 1)s² / σ₀² is small when the sample variance is below the claimed σ₀² and large when it is above. H₁: σ² < σ₀² uses the left tail, H₁: σ² > σ₀² the right tail, and H₁: σ² ≠ σ₀² doubles whichever tail is smaller. For example, χ² = 8.9 with df = 19 has a left-tail area of 0.0249, so the two-tailed p-value is 0.0498.

Chi-square p-value in Excel, R, Python and on a TI-84

Every package computes the same right-tail area. The examples use χ² = 10.05 and df = 4, which all return 0.0396.

ToolRight-tailed p-valueLeft-tailed p-value
Excel / Google Sheets=CHISQ.DIST.RT(10.05, 4)=CHISQ.DIST(10.05, 4, TRUE)
Rpchisq(10.05, 4, lower.tail = FALSE)pchisq(10.05, 4)
Python (SciPy)chi2.sf(10.05, 4)chi2.cdf(10.05, 4)
TI-83 / TI-84χ²cdf(10.05, 1E99, 4)χ²cdf(0, 10.05, 4)

Common use cases

  • Finishing a goodness-of-fit test for dice, genetics ratios, market shares or survey answers.
  • Getting the p-value for a chi-square test of independence on a contingency table.
  • Testing whether a process variance meets a specification, with a left, right or two-tailed alternative.
  • Converting likelihood-ratio or deviance statistics from logistic and log-linear models, which are approximately χ² under H₀.

Assumptions and limitations

  • The χ² approximation for count data needs large enough expected counts; a common rule is that every expected count is at least 5. For small 2 × 2 tables use Fisher’s exact test.
  • The df must be right. Subtract one extra degree of freedom for every parameter estimated from the data in a goodness-of-fit test.
  • If you use the Yates continuity correction on a 2 × 2 table, apply it when computing χ², then enter the corrected statistic with df = 1. The p-value step is the same either way.
  • The variance test is very sensitive to non-normal data, unlike the count-based tests. With skewed or heavy-tailed data its p-value can be badly off.
  • A significant χ² says the counts depart from H₀ somewhere, not where or by how much. Look at the individual (O − E)² / E contributions and an effect size such as Cramér’s V.

Frequently asked questions

How do you calculate the p-value from chi-square?

Find the area to the right of your χ² statistic under the chi-square curve with the correct degrees of freedom: p = 1 − CDF(χ², df). Enter χ² and df in the calculator, or use =CHISQ.DIST.RT(χ², df) in Excel or pchisq(χ², df, lower.tail = FALSE) in R. For example, χ² = 10.05 with df = 4 gives p = 0.0396.

Does a chi-square test have a p-value?

Yes. Every chi-square test produces a χ² statistic and degrees of freedom, and the p-value is the probability of a statistic at least that large if H₀ were true. Goodness-of-fit and independence tests use the right-tail area.

What does 0.05 mean in a chi-square test?

0.05 is the usual significance level α. If the p-value is 0.05 or less, a χ² this large would happen in at most 5% of samples when H₀ is true, so you reject H₀. Equivalently, χ² exceeds the critical value, which is 3.841 for df = 1 and 9.488 for df = 4.

Is a chi-square test always right-tailed?

Goodness-of-fit and independence tests are always right-tailed, because larger χ² values mean a worse fit to H₀. The exception is the test about a single variance, which can be left-tailed, right-tailed or two-tailed depending on the alternative hypothesis.

How do I find a chi-square p-value without a table?

Enter the statistic and df here. The calculator evaluates the chi-square CDF with the regularized incomplete gamma function and subtracts it from 1 for the right tail, giving an exact p-value instead of the range a printed table provides.

What chi-square value is significant at 0.05?

It depends on df. For a right-tailed test at α = 0.05 the critical value is 3.841 for df = 1, 5.991 for df = 2, 9.488 for df = 4 and 18.307 for df = 10. The Chi-Square Critical Value Calculator gives it for any df and α.

Why does a two-tailed chi-square p-value double the smaller tail?

The chi-square distribution is skewed right, so there is no single distance from the centre that cuts off equal areas on both sides. Doubling the smaller tail area gives the equal-tail p-value, which matches the usual two-sided confidence interval for a variance.

Can the chi-square statistic be zero?

Yes, χ² = 0 when every observed count equals its expected count. The right-tail p-value is then 1. A statistic that is suspiciously close to zero compared with its df can indicate data that fit too perfectly.

Cite this page

Statculator. (2026, November 14). P-Value from Chi-Square Calculator. Retrieved November 14, 2026, from https://statculator.com/p-values-critical-values/p-value-from-chi-square-calculator/