Statistics & Probability

Chi-Square Goodness of Fit Calculator

Enter the observed counts and the expected counts or proportions, in the same order.

Your numbers

Separate numbers with commas, spaces or new lines. You can paste a column from a spreadsheet.
Separate numbers with commas, spaces or new lines. You can paste a column from a spreadsheet.

Your results

Chi-square statistic
Chi-square statistic
—
Degrees of freedom
—
p-value
—
Conclusion
—
Expected count check
—

Chi-Square Goodness of Fit Calculator by TheCalcTools

How the Chi-Square Goodness of Fit Calculator works

Pearson’s statistic adds up (observed − expected)² ÷ expected over all categories. Expected values entered as proportions are scaled to the observed total.

Compare it with the chi-square distribution with (categories − 1) degrees of freedom. The test needs expected counts of about 5 or more in each category.

The formula

χ² = Σ (O − E)² ÷ E; df = k − 1

Worked example

Using the default values shown in the calculator:

Observed counts48, 35, 15, 2
Expected counts or proportions (scaled automatically)0.45, 0.35, 0.15, 0.05
Significance level α0.05
  1. χ² = 2.0000 with 3 degrees of freedom, p = 0.572407.
  2. No significant difference from the expected distribution.

Result:

Chi-square statistic2.0000
Degrees of freedom3
p-value0.572407
ConclusionNo significant difference from the expected distribution
Expected count checkAll expected counts are at least 5

Frequently asked questions

What does a large chi-square mean?

The observed counts are far from what you expected. The p-value tells you how surprising that is if the expected distribution were true.

Sources and further reading

More in Statistics & Probability · All calculators

This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.