Statistics

Chi-Square Goodness of Fit Calculator

Compare observed vs expected category counts.

Enter your values

Enter the observed counts (comma-separated) you are working with.

Enter the expected counts (comma-separated) you are working with.

Results update instantly as you type — no submit needed. Your values are remembered on this device, and the shareable link reopens the calculator with exactly these numbers.

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

At a glance

What it doesCompare observed vs expected category counts.
CategoryStatistics
Inputs neededObserved counts (comma-separated), Expected counts (comma-separated)
Main outputChi-square statistic
Formulaχ² = Σ (O-E)²/E
CostFree — no sign-up, no download

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.

Inputs explained

Observed counts (comma-separated)
Enter the observed counts (comma-separated) you are working with.
Expected counts (comma-separated)
Enter the expected counts (comma-separated) you are working with.

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.

What do I need to enter into the Chi-Square Goodness of Fit Calculator?

Just 2 values: observed counts (comma-separated), expected counts (comma-separated). Every field starts with a realistic example, so you can change one number at a time and watch the result update instantly.

How does the Chi-Square Goodness of Fit Calculator work out the answer?

The chi-square statistic sums the squared difference between observed and expected counts, divided by expected, across all categories. It applies the formula χ² = Σ (O-E)²/E and shows the working so you can check each step by hand.

Is the Chi-Square Goodness of Fit Calculator free, and do I need an account?

It is completely free with no sign-up, no download and no usage limit. Everything is calculated in your browser, so the numbers you type never leave your device.

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