Part of the Maths & Statistics suite · 235 calculators

Chi-Square Calculator

The chi-square statistic and its exact p-value, for testing whether observed counts differ from what was expected.

Chi-square compares counts you observed with counts you expected, summing (observed − expected)² ÷ expected across every category.

Leave blank for an equal split across the categories
Results update as you type
Results
χ² statistic
37.818
p-value
Degrees of freedom
Categories
Expected-count check
At the 5% level
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows the Australian Curriculum (maths, brackets, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About chi-square

How the chi-square calculator works

Chi-square compares counts you observed with counts you expected, summing (observed − expected)² ÷ expected across every category. Large values mean the observed pattern is far from the expectation; the p-value says how often chance alone would produce a gap that big.

Two conditions matter. The test works on counts, not percentages or means — converting to percentages first is the commonest error and inflates the statistic. And it becomes unreliable when expected counts are very small; the usual rule of thumb is that every expected count should be at least five, which the calculator checks and warns about.

Formula: χ² = Σ (observed − expected)² ÷ expected

Worked examples

Inputsχ² statisticNote
Six categories against an equal split37.78χ² = 34.4, p < 0.0001 — clearly not uniform
A fair die rolled 60 times0χ² = 0 — a perfect fit
A small-count warning0expected counts under 5

Frequently asked questions

What does chi-square test?

Whether observed counts differ from expected counts by more than chance comfortably explains.

Can I use percentages?

No. The test works on raw counts. Converting to percentages first inflates the statistic and invalidates the result.

What if my expected counts are small?

Below about five the approximation becomes unreliable. Combine categories, or use an exact test such as Fisher's.

How many degrees of freedom?

For goodness of fit, categories minus one. For a contingency table it is (rows − 1) × (columns − 1).

What does a significant result mean?

That the pattern differs from expectation. It does not say which category drove it — look at the individual contributions for that.

Where these figures come from

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.