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 − 1
  • Cramér's V = √(χ² ÷ (N × df))

Inputs explained

InputUnitRequiredNotes
Observed frequenciestextYesSeparate values with commas, spaces or new lines.
Expected frequenciestextOptionalLeave blank to assume all categories are equally likely.
Significance levelone of 3 optionsYes

How to use it

  1. Choose Significance level.
  2. Enter Observed frequencies.
  3. Optionally add Expected frequencies.
  4. 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.

Related calculators