Chi-Square Calculator
Run a chi-square goodness-of-fit test on observed versus expected counts.
What the Chi-Square Calculator does
The chi-square goodness-of-fit test compares observed category counts against what a hypothesis predicts. Large discrepancies produce a large statistic and a small p-value, indicating the data does not fit the expected pattern.
Formula
χ² = Σ((Observed − Expected)² ÷ Expected)Degrees of freedom = Number of categories − 1Cramér's V = √(χ² ÷ (N × df))
Inputs explained
| Input | Unit | Required | Notes |
|---|---|---|---|
| Observed frequencies | text | Yes | Separate values with commas, spaces or new lines. |
| Expected frequencies | text | Optional | Leave blank to assume all categories are equally likely. |
| Significance level | one of 3 options | Yes | — |
How to use it
- Choose Significance level.
- Enter Observed frequencies.
- Optionally add Expected frequencies.
- Select Calculate.
Worked example
Rolling a die 60 times and observing 8, 9, 12, 10, 11, 10.
- Observed
- 8, 9, 12, 10, 11, 10
- Expected
- (blank — assumes 10 each)
χ² = 1.0 with 5 df, p ≈ 0.963 — entirely consistent with a fair die.
Frequently asked questions
What if expected frequencies are below 5?
The approximation becomes unreliable. Combine small categories, or use Fisher's exact test for small contingency tables.
Does a significant result tell me which category is wrong?
No. Check the per-category contributions in the table — the largest values show where the observed data departs most from expectation.