Chi-Square Calculator
Run a chi-square goodness-of-fit test on observed vs. expected frequencies.
Assumptions used in this calculation
- Degrees of freedom: Degrees of freedom are calculated as the number of categories minus 1 (df = k − 1), the standard convention for a goodness-of-fit test.
About this calculator
Statistics and research methods courses regularly ask students to test whether observed data (survey responses across categories, dice roll outcomes, genetic ratios) fits a theoretically expected distribution, and computing the chi-square statistic by hand across several categories, then looking up a p-value from the distribution, is tedious and error-prone to do manually. This calculator takes a list of observed frequencies and a matching list of expected frequencies, computes the chi-square statistic as the sum of (Observed − Expected)² ÷ Expected across every category, then derives the degrees of freedom and p-value to tell you whether the difference between observed and expected is statistically significant. It's built for students running a goodness-of-fit test for a stats assignment, or anyone checking whether a real-world frequency distribution plausibly matches an expected one. Getting the degrees of freedom and p-value lookup right by hand takes a statistical table or software, this calculator produces both instantly alongside the raw statistic.
Worked example
[10,20,30,40] vs [25,25,25,25]
Result: χ²=20, p<0.001 (significant)
Was this helpful?

