Chi-Square Probability Calculator
The chi-square distribution underpins goodness-of-fit tests, tests of independence in contingency tables, and variance tests. This calculator takes a chi-square statistic and its degrees of freedom and returns the cumulative probability to the left, the right-tail p-value used in hypothesis testing, and the percentile of the statistic. The computation uses the regularized lower incomplete gamma function evaluated with a stable series and continued-fraction expansion, so results are accurate across the full range of statistics and degrees of freedom commonly seen in practice.
Chi-square distribution formula
CDF F(x; k) = P(k/2, x/2)
where P(a, z) is the regularized lower incomplete gamma function
Right-tail p-value = 1 - F(x; k)
Percentile = F(x; k) * 100
The statistic x must be non-negative and the degrees of freedom k must be positive.
Chi-square test context
- Goodness-of-fit degrees of freedom: categories minus one minus estimated parameters.
- Contingency table degrees of freedom: (rows minus one) times (columns minus one).
- The right-tail p-value is what you compare against your significance level.
- A statistic of 11.07 at 5 degrees of freedom corresponds to the common 0.05 critical value.
- The chi-square distribution is a special case of the gamma distribution.
Chi-square probability: frequently asked questions
What does this chi-square calculator return?
Enter a chi-square statistic and the degrees of freedom. It returns the cumulative probability (the area to the left of the statistic), the right-tail p-value (the area to the right, used in hypothesis tests), and the percentile of the statistic in the chi-square distribution.
How is the chi-square p-value computed?
The chi-square cumulative distribution function with k degrees of freedom equals the regularized lower incomplete gamma function P(k/2, x/2). The right-tail p-value is 1 minus that value. The calculator evaluates the incomplete gamma function with a numerically stable series and continued-fraction expansion.
What are degrees of freedom in a chi-square test?
Degrees of freedom usually depend on the test. For a goodness-of-fit test it is the number of categories minus one minus the number of estimated parameters. For a contingency table it is (rows minus one) times (columns minus one). Enter the value appropriate to your test.
What p-value indicates significance?
A common threshold is 0.05: if the right-tail p-value is below your chosen significance level, you reject the null hypothesis. The calculator reports the exact p-value so you can compare it against any threshold you select.
Does the statistic have to be a whole number?
No. The chi-square statistic is a continuous, non-negative value and is usually not an integer. Degrees of freedom are typically whole numbers, but the underlying gamma function accepts positive real values, so fractional degrees of freedom are also supported.
Official sources
- U.S. NIST/SEMATECH e-Handbook of Statistical Methods: Chi-Square Distribution.
- NIST Digital Library of Mathematical Functions: Incomplete Gamma Functions.
Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.