Chi-Square Goodness of Fit Calculator
Compare observed category counts to expected frequencies with Pearson's chi-square goodness-of-fit test, contribution table, and right-tail p-value.
Separate with commas, spaces, or new lines (2–30 categories).
Must sum to the same total as observed counts.
Subtract from df = k − 1 when parameters were estimated from the data (usually 0).
Related Calculators
Chi-Square Test of Independence Calculator
Run Pearson's chi-square test on an r×c contingency table with expected counts, residuals, Cramér's V, and p-value.
Chi-Square Calculator
Test observed counts against expected counts with a chi-square goodness-of-fit test.
Chi-Square Table (χ² Critical Values)
Look up chi-square critical values for degrees of freedom 1 to 100 across ten common tail areas.
Hypotheses
H0: The data follow the specified distribution. Ha: They do not. Use chi-square independence for two-way tables.
χ² = Σ (O_i − E_i)² / E_i
df = k − 1 − ddof
Worked example
Observed 5, 8, 9, 8, 10, 20 vs expected 10 each (60 total): χ² = 13.4, df = 5, p ≈ 0.0199 (matches Load example).
Related guides and calculators
To test whether two categorical variables are related use the chi-square test of independence. The chi-square table and the critical value calculator give the cutoff, the degrees of freedom calculator counts the df, and the chi-square test explained, how to read a chi-square table and the chi-square test in Excel cover the ideas and the spreadsheet steps.
Frequently Asked Questions
When is this test appropriate?
When you have one categorical variable and want to compare observed counts to a theoretical distribution.
What if expected counts are small?
Merge adjacent categories to raise expected counts, or use exact multinomial tests; do not silently drop categories.
What is ddof?
Extra degrees of freedom subtracted when parameters (like category probabilities) were estimated from the same data.
How do I test a fair die?
Enter six equal expected proportions (1/6 each) or equal expected counts summing to the roll total.
Excel equivalent?
CHISQ.TEST(observed_range, expected_range) returns the p-value for this test.
Embed This Calculator
Add this free calculator to your course page or LMS.
Adjust the height value to fit your page.