Chi-square distribution calculator

Choose a mode and enter the chi-square value or the significance level α together with the degrees of freedom. You get the right-tail p-value and the CDF, or the critical value that cuts off α in the upper tail, plus the mean and variance of the distribution.

Find
P-value P(χ² ≥ x)0.050014
Cumulative probability P(χ² < x)
0.949986
Mean (= df)
1
Variance (= 2·df)
2

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Choose P-value from χ² or Critical χ² from α.
  2. Enter the chi-square statistic (zero or positive) or the significance level.
  3. Enter the degrees of freedom.
  4. Read the p-value and CDF, or the upper and lower critical values. The mean and variance of the distribution are shown in both modes.

How it works

The chi-square distribution with k degrees of freedom is a gamma distribution with shape k/2 and scale 2. Its upper tail is

P(χ² ≥ x) = Q(k/2, x/2),

the regularised upper incomplete gamma function. The CDF is 1 − Q. Critical values are found by inverting Q numerically: the upper critical value has P(χ² ≥ x) = α, the lower one has P(χ² ≥ x) = 1 − α. The mean is k and the variance 2k.

Worked example

With df = 2 the tail is simply e^(−x/2). For χ² = 2: e^(−1) = 0.367879, so the CDF is 0.632121.

The critical value for α = 0.05 and df = 2 solves e^(−x/2) = 0.05: x = −2 ln 0.05 = 5.9915. The lower critical value is −2 ln 0.95 = 0.1026.

Tips

  • This is the distribution, not the test. To compute χ² from a table of counts, use the chi-square test of independence or goodness-of-fit calculator, then check the p-value here if you need it for other df.
  • The p-value is always the right tail in tests of independence and goodness of fit: large χ² means a poor fit.
  • Small expected counts (under 5) make the chi-square approximation unreliable; consider Fisher’s exact test for 2 × 2 tables.

Frequently asked questions

How do I get a p-value from a chi-square statistic?

Enter χ² and the degrees of freedom. The p-value of a chi-square test is the right tail P(χ² ≥ x): the chance of a value at least this large if the null hypothesis holds. For χ² = 3.841 with df = 1 it is about 0.05.

What is the critical chi-square value at 0.05?

Enter α = 0.05 and df. For df = 1 the critical value is 3.8415, for df = 2 it is 5.9915. A test statistic above the critical value is significant at that level.

What are the degrees of freedom for a chi-square test?

For a test of independence on an r × c table, df = (r − 1)(c − 1). For a goodness-of-fit test with k categories, df = k − 1, minus one more for each parameter estimated from the data.

When do I need the lower critical value?

For a two-sided test or confidence interval for a variance, which uses both tails. With α split in two, take the upper value for α/2 and the lower value for α/2 by entering α/2.

More in Math

All tools in this category: Math ·Updated November 7, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.