Chi-Square to P-value Calculator

Share calculator:
Embed this tool:

Type the chi-square value from your test and its degrees of freedom to get the p-value. It is the quickest way to finish a test when you already have the statistic but not the probability.

What the calculator does

Many tests end with a chi-square (Χ²) statistic: the test of independence on a contingency table, a goodness-of-fit test, the log-rank test and likelihood-ratio tests among them. The statistic alone does not say how surprising your data are. For that you need its p-value, the probability of getting a Χ² at least this large if the null hypothesis were true.

This calculator takes the statistic and the degrees of freedom and returns that probability, using the upper (right) tail of the chi-square distribution. If you only have raw counts, use the chi-square calculator, which computes the statistic first.

How to use it

  1. Enter the Χ² statistic, for example 2.05. It cannot be negative.
  2. Enter the degrees of freedom, which defaults to 1. For a table of counts it is (rows − 1) × (columns − 1); for a single variable with N categories it is N − 1.
  3. Press Calculate P-value. The answer is shown with up to ten decimals.

Whole numbers are the norm for degrees of freedom, but any value of 1 or more is accepted. A negative statistic cannot arise from a chi-square test; the calculator shows nan (not a number) for it, and a statistic of 0 gives a p-value of 1.

The math behind it

If X follows a chi-square distribution with k degrees of freedom, the p-value for an observed statistic x is the upper-tail probability:

p = P(X ≥ x) = Q(k/2, x/2) = Γ(k/2, x/2) ÷ Γ(k/2)Q is the regularised upper incomplete gamma function.

Two special cases need no special functions. With 2 degrees of freedom the distribution is exponential and p = e−x/2. With any even k the p-value is a short finite sum:

p = e−x/2 · [ 1 + (x/2) + (x/2)²/2! + … + (x/2)k/2 − 1/(k/2 − 1)! ]

With 1 degree of freedom, Χ² is the square of a standard normal value, so p = 2 × (1 − Φ(√x)). A Χ² of 3.841 therefore matches a z-score of 1.96; use the z-score to p-value calculator to check this.

Worked examples

Two degrees of freedom. A goodness-of-fit test on three categories gives Χ² = 2. Then p = e−1 = 0.3679, nowhere near significance.

Four degrees of freedom. A 5 by 2 table gives Χ² = 10 with (5 − 1) × (2 − 1) = 4 degrees of freedom. Using the even-df sum, p = e−5 × (1 + 5) = 6 × 0.0067379 = 0.0404. That is below 0.05, so you would reject the null hypothesis at the 5% level but not at the 1% level.

One degree of freedom. For Χ² = 2.05 the calculator returns 0.1522. This equals the probability of a z-score beyond ±1.432, which is how the one-degree case links to the normal distribution.

Quick reference: p-values for common statistics

Right-tail p-values rounded to four decimals.
dfΧ² = 1Χ² = 3Χ² = 5Χ² = 10Χ² = 15
10.31730.08330.02530.00160.0001
20.60650.22310.08210.00670.0006
30.80130.39160.17180.01860.0018
40.90980.55780.28730.04040.0047
50.96260.70000.41590.07520.0104
100.99980.98140.89120.44050.1321

Notice that the same statistic is far less impressive with more degrees of freedom: Χ² = 10 is highly unusual for 1 degree of freedom (p = 0.0016) but entirely ordinary for 10 (p = 0.44), because a chi-square variable has a mean equal to its degrees of freedom.

Interpreting the p-value

  • A small p-value (conventionally below 0.05) means data as extreme as yours would be unusual if the null hypothesis were true, which is evidence against it.
  • A large p-value means the data are compatible with the null hypothesis. It does not prove the null hypothesis is true.
  • The test is one-sided by construction: only large statistics count as evidence, so the upper tail is used even for a "two-sided" question about a table.
  • The p-value is not the probability that the null hypothesis is true, nor the chance that the result will replicate.

To compare the statistic with a fixed cut-off instead, use the critical value calculator; for a broader explanation of significance levels, see the p-value significance calculator.

Tiny p-values and other limits

  • Results are rounded to ten decimals. Values below about 0.00000000005 are reported as 0 or 0.0000000001, so read either as "p less than 0.0000000001" rather than as an exact value.
  • The chi-square approximation behind many tests breaks down for small samples, for example when expected counts fall below 5. The p-value of the statistic is still computed correctly here, but the test itself may not be reliable.
  • Make sure the degrees of freedom match the test you ran. The wrong value changes the p-value dramatically, as the table shows.

Frequently asked questions

How do I convert a chi-square value to a p-value?

Take the area under the chi-square distribution curve to the right of your statistic, using your degrees of freedom. This calculator does that in one step; with 2 degrees of freedom you can also compute it by hand as e raised to the power of minus half the statistic.

Is the p-value one-tailed or two-tailed?

It is the right tail. Chi-square statistics are never negative and only large values indicate a poor fit or an association, so the upper tail is the relevant probability.

What is a significant chi-square value?

It depends on the degrees of freedom. At the 5% level the critical values are 3.841 for 1 degree of freedom, 5.991 for 2, 7.815 for 3, 9.488 for 4 and 11.070 for 5.

Why does the calculator show nan?

A negative statistic is impossible for a chi-square test, so no probability exists for it. Check that you entered the value correctly.

References

  1. NIST/SEMATECH e-Handbook of Statistical Methods.
  2. Abramowitz M, Stegun IA, eds. Handbook of Mathematical Functions. National Bureau of Standards; 1964. Chapter 26: Probability functions.

Cite this calculator and page

If you use this page in your work, you can cite it as:

Reeliy Editorial Team. (2026). Chi-Square to P-value Calculator. Reeliy. https://reeliy.com/calculators/chi-square-to-p-value-calculator“Chi-Square to P-value Calculator.” Reeliy, 2026, https://reeliy.com/calculators/chi-square-to-p-value-calculator.