Skip to content
Omnikalc

Chi-square distribution: p-value of χ² and critical values

Find the p-value of a chi-square statistic for any degrees of freedom, the critical value for a significance level, and the density and cumulative probability.

Updated on
Your inputs

Value out of range

Value out of range

Results

p-value (right tail, P(χ² ≥ x))

0.0517

Not significant: p is at or above α, so the data do not reject the null hypothesis
Critical value at α
12.5916
Cumulative probability P(χ² ≤ x)
0.9483
Density at x
0.018852
Mean of the distribution (k)
6
Standard deviation (√2k)
3.4641

The chi-square distribution

The chi-square (χ²) distribution is the distribution of a sum of squared standard normal variables. It appears in tests of goodness of fit, tests of independence in contingency tables, likelihood ratio tests and confidence intervals for a variance. Its shape depends on the degrees of freedom k: skewed to the right for small k, closer to normal for large k.

What the calculator gives

  • the p-value of a χ² statistic, P(χ² ≥ x), which is the right tail used in almost every χ² test;
  • the critical value for a significance level, as in a printed χ² table;
  • the cumulative probability, the density, the mean (k) and the standard deviation (√2k).

Example

A goodness-of-fit test gives χ² = 12.5 with 6 degrees of freedom:

  • p ≈ 0.052: just above 0.05;
  • the critical value at α = 0.05 is 12.592, so χ² falls just short of it.

Degrees of freedom

  • Goodness of fit: number of categories − 1 − number of parameters estimated from the data.
  • Contingency table: (rows − 1) × (columns − 1). A 2 × 2 table has 1 degree of freedom; a 3 × 4 table has 6.
  • Variance of a normal sample: n − 1.

Common critical values (α = 0.05)

df χ² critical
1 3.841
2 5.991
3 7.815
4 9.488
5 11.070
10 18.307
20 31.410

Conditions for χ² tests

  • Observations are independent and counted, not measured.
  • Expected counts should usually be at least 5 in most cells; otherwise, merge categories or use an exact test (Fisher’s exact test for 2 × 2 tables).
  • Use the raw counts, not percentages.

Confidence interval for a variance

For a normal sample of size n with variance s², the confidence interval of the population variance is

(n − 1)s² ÷ χ²(1 − α/2) to (n − 1)s² ÷ χ²(α/2)

using critical values with n − 1 degrees of freedom. Use the calculator with α set to twice the tail you need.

For a 2 × 2 table, the chi-square test calculator computes χ² from the counts directly.

Frequently asked questions

What is the critical chi-square value for 1 degree of freedom?

3.841 at α = 0.05 and 6.635 at α = 0.01.

How do I find degrees of freedom for a contingency table?

(rows − 1) × (columns − 1). A 2 × 2 table has 1 degree of freedom.

Is the chi-square p-value one-tailed?

Yes, chi-square tests use the right tail, P(χ² ≥ x), because larger values mean worse fit.

What are the mean and variance of the chi-square distribution?

The mean equals the degrees of freedom k and the variance is 2k.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.