Chi-Square Calculator
Run a chi-square goodness-of-fit test comparing observed vs expected frequencies.
About Chi-Square Calculator
The chi-square goodness-of-fit test measures how well observed categorical data match an expected distribution. Large χ² values (small p-values) indicate the observed data differ significantly from what was expected.
Formula
χ² = Σ (Oᵢ − Eᵢ)² / Eᵢ
- Oᵢ
- Observed frequency
- Eᵢ
- Expected frequency
Worked example
With the default values below, Chi-Square Calculator returns χ² Statistic of 2.0000. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Observed frequencies (comma separated)
- 16, 18, 16, 14, 12, 12
- Expected frequencies (comma separated)
- 15, 15, 15, 15, 15, 15
Results
- χ² Statistic
- 2.0000
- P-value
- 0.849145
- Degrees of Freedom
- 5
Step by step
- 1Values used
- 2Formula applied
- 3χ² Statistic= 2.0000
- 4P-value= 0.849145
- 5Degrees of Freedom= 5
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax or fees or charges into account.
- Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
What are the assumptions of the chi-square test?
Observations must be independent, all expected frequencies should be at least 5, and the data must be counts (not proportions or means).
What does a small p-value mean?
A p-value below your significance level (commonly 0.05) means you reject the hypothesis that the data follow the expected distribution.
