Chi-Square Calculator

Reviewed by CalcMulti Editorial Team·Last updated: ·Statistics Hub

The chi-square (χ²) test is used to determine whether observed frequencies differ significantly from expected frequencies. It works with categorical data and does not assume a normal distribution.

This calculator supports the goodness of fit test (does data match an expected distribution?) and outputs the χ² statistic, degrees of freedom, p-value, and test conclusion at the α = 0.05 significance level.

Formula

χ² = Σ (O − E)² / E df = k − 1 (goodness of fit)

O
observed frequency in each category
E
expected frequency in each category
k
number of categories
df
degrees of freedom

Enter observed and expected frequencies for each category. All expected values should be ≥ 5.

CategoryObserved (O)Expected (E)

Chi-Square Critical Values (α = 0.05)

dfχ² critical (α = 0.05)χ² critical (α = 0.01)Typical use case
13.8416.6352-category goodness of fit
25.9919.2103-category or 2×2 contingency
37.81511.3454-category goodness of fit
49.48813.2775-category test
511.07015.0866-category test
916.91921.6662×5 contingency table

Common Mistakes

Expected frequencies below 5

Chi-square is an approximation that breaks down when any expected cell count is below 5. Combine categories or use Fisher's exact test. Chi-square with small expected counts produces an inflated test statistic.

Using raw proportions instead of counts

Chi-square requires actual frequencies (counts), not percentages or proportions. Convert: if 30% of 100 people chose option A, enter O = 30, not 0.30.

Forgetting to calculate expected values correctly

For independence tests, expected = (row total × column total) / grand total — not simply n/k. For goodness of fit, expected = n × hypothesised proportion for each category.

Disclaimer

Chi-square results are approximate and assume expected cell counts ≥ 5. For small samples or sparse tables, consider Fisher's exact test. Statistical significance does not imply practical significance.

Frequently Asked Questions