Chi-Square Test Calculator
Compute a chi-square goodness-of-fit statistic, degrees of freedom, and p-value from observed vs. expected counts. Runs entirely in your browser.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
Example
Chi-Square Test Calculator
Observed vs expected
Example shown — replace it with your own observed/expected counts.
Result
How it works
- Enter your observed counts for each category.
- Enter (or accept the default) expected counts per category.
- Get the chi-square statistic, degrees of freedom, and p-value.
The formula
The chi-square statistic sums the squared difference between observed and expected, scaled by expected:
χ² = Σ (O − E)² / E
FAQ
What is a chi-square test used for?
It checks whether observed category counts differ significantly from what you'd expect under a null hypothesis, commonly used for survey data and categorical comparisons.
How do I read the p-value?
A small p-value (typically under 0.05) suggests the observed differences are unlikely to be due to chance alone, so you'd reject the null hypothesis.
What are degrees of freedom here?
For a goodness-of-fit test, degrees of freedom equal the number of categories minus one — it feeds into how the chi-square statistic maps to a p-value.
What p-value counts as statistically significant?
By common convention, p < 0.05 is treated as significant, though some fields use a stricter 0.01 threshold — check what standard applies to your context before drawing conclusions.
How we compare
| Feature | Online Tool Store | Statistics software (SPSS/R) | Manual formula in a spreadsheet |
|---|---|---|---|
| No software install | ✓ | ✗ | ✓ |
| Instant, in-browser result | ✓ | Setup required | Manual |
| Free to use | ✓ | Often paid | ✓ |
For a quick chi-square check on a small dataset, this beats opening statistics software for one calculation.