Statistics

Chi-Square Goodness of Fit Calculator

Compare observed vs expected category counts.

Enter your values

ⓘ Live results

Results
Chi-square statistic
2.9
Degrees of freedom
3
Categories
4

Quick answer

The chi-square statistic sums the squared difference between observed and expected counts, divided by expected, across all categories.

χ² = Σ (O-E)²/E

How to use the Chi-Square Goodness of Fit Calculator

  1. 1List the observed count for each category.
  2. 2List the expected count for each matching category.
  3. 3The chi-square statistic sums the squared relative differences; compare it to a chi-square table with df = categories - 1.

Worked example

Using the values the calculator loads with:

Inputs

  • Observed counts (comma-separated)18,22,25,15
  • Expected counts (comma-separated)20,20,20,20

Results

  • Chi-square statistic2.9
  • Degrees of freedom3
  • Categories4

Frequently asked questions

What counts as a good fit?

A small chi-square statistic relative to the degrees of freedom suggests observed data matches expected well.

What if expected counts are very small?

The chi-square approximation works best when expected counts are at least 5 per category.

About this calculator

Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.