Chi-Square Test Calculator
StatisticsRun a chi-square goodness-of-fit test in seconds. Enter up to six rows of observed vs expected frequencies to get the chi-square statistic, degrees of freedom, and verdict.
Add up to 6 categories. At least 2 rows are required.
Chi-Square Statistic (χ²)
Degrees of Freedom
0
Critical (α=0.05)
0
Not Statistically Significant
No significant difference from the expected frequencies (fail to reject the null hypothesis).
What is a Chi-Square Test?
The Chi-Square Test Calculator runs a chi-square goodness-of-fit test on your observed versus expected frequency data across up to six categories. It computes the chi-square statistic, degrees of freedom, critical value, and a plain-language verdict on whether your observed data significantly differs from what was expected.
The chi-square goodness-of-fit test is the standard statistical tool for comparing category counts (not numeric averages) against a theoretical or historical expectation. Whether you're checking if a die is fair, if survey responses match a known population distribution, or if defect counts differ meaningfully across production lines, this test quantifies exactly how much the observed pattern deviates from the expected one.
For comparing numeric averages between two groups instead of category counts, use the T-Test Calculator.
How to use this Chi-Square Test calculator
Enter your observed frequencies — the actual counts you recorded for each category.
Enter your expected frequencies — the counts predicted by your theory, model, or historical baseline for the same categories.
Add or remove categories as needed — the calculator supports 2 to 6 rows of observed/expected pairs.
Read the chi-square statistic and critical value — compare them directly, or rely on the automatic significance verdict shown below the result.
Check the step-by-step breakdown — see exactly how each category's (O−E)²/E contribution combined into the final statistic.
Interpret the verdict in context — a significant result tells you the observed pattern differs from expected, but doesn't by itself explain why — investigate the categories with the largest individual contributions to understand the source of the deviation.
Formula & Methodology
Chi-square statistic: χ² = Σ [(Observed − Expected)² / Expected] Degrees of freedom: df = number of categories − 1 Variable definitions: - Observed — the actual recorded frequency for a category - Expected — the predicted or theoretical frequency for that category - Σ — sum across all categories Worked example: Testing whether customer complaints are evenly distributed across 4 product lines, with 66 total complaints expected evenly (16.5 each) but observed as: 18, 22, 11, 9. Category 1: (18−15)²/15 (adjusting expected proportionally) — using expected = 15 for each category for this example: (18−15)²/15 = 0.6 (22−15)²/15 = 3.267 (11−15)²/15 = 1.067 (9−15)²/15 = 2.4 Step 1 — Sum: χ² = 0.6 + 3.267 + 1.067 + 2.4 = 7.33 Step 2 — Degrees of freedom: 4 categories − 1 = 3 Step 3 — Critical value at α = 0.05, df = 3: 7.815 Step 4 — Verdict: χ² = 7.33 does not exceed 7.815 → not statistically significant at the 5% level (though it is close, suggesting a larger sample might reveal a real pattern). Assumption: The chi-square approximation is most accurate when each expected frequency is at least 5. Categories with very small expected counts can make the test unreliable and may need to be combined with adjacent categories before testing.
Frequently Asked Questions