Chi Square Calculator
Enter observed and expected counts to instantly compute the chi-square statistic, degrees of freedom, and p-value.
Test Configuration
Leave Expected blank to assume equal distribution.
Enter observed counts — expected values are computed automatically.
Enter your data and click Calculate to see results.
χ² Statistic
—
Degrees of Freedom
—
P-Value
—
Cell Breakdown
| Cell | Observed | Expected | (O−E)²/E |
|---|
One or more expected counts are below 5. Results may be unreliable — consider merging categories or using Fisher's exact test.
Copied!
Summary
Enter observed and expected counts to instantly compute the chi-square statistic, degrees of freedom, and p-value.
How it works
- Choose between Goodness-of-Fit or Independence (contingency table) mode.
- Enter the number of categories or table dimensions.
- Fill in your observed counts (and expected counts for goodness-of-fit).
- The calculator computes χ² = Σ (O − E)² / E across all cells.
- Degrees of freedom are calculated automatically from your table size.
- The p-value is derived from the chi-square cumulative distribution function.
Use cases
- Test whether a die is fair by comparing rolled outcomes to expected uniform distribution.
- Analyze survey responses to check if preferences differ by demographic group.
- Validate genetics experiments against expected Mendelian ratios.
- Check whether website conversion rates are independent of traffic source.
- Assess whether observed frequency data fits a theoretical distribution.
- Quality-control checks on manufacturing defect rates across production lines.
Frequently Asked Questions
Last updated: 2026-06-10 ·
Reviewed by Nham Vu