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.
| Category | Observed (O) | Expected (E) | |
|---|---|---|---|
Chi-Square Critical Values (α = 0.05)
| df | χ² critical (α = 0.05) | χ² critical (α = 0.01) | Typical use case |
|---|---|---|---|
| 1 | 3.841 | 6.635 | 2-category goodness of fit |
| 2 | 5.991 | 9.210 | 3-category or 2×2 contingency |
| 3 | 7.815 | 11.345 | 4-category goodness of fit |
| 4 | 9.488 | 13.277 | 5-category test |
| 5 | 11.070 | 15.086 | 6-category test |
| 9 | 16.919 | 21.666 | 2×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.
Related Calculators
Compare means of two groups
P-Value Calculatorp-value from any test statistic
Normal Distribution CalculatorContinuous probability distribution
Sample Size CalculatorMinimum sample for hypothesis tests
Z-Score CalculatorStandard score for continuous data
Statistics HubAll statistics calculators
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.