Statistics

Chi-Square Goodness of Fit Calculator

Compare observed category counts against fully specified expected counts with a Pearson chi-square test.

Data stays on this deviceConvention explained below
Data explorer
Data explorer

Check the dataset and sample convention before interpreting results.

See the method

Add your observations

Runs on your device

Your statistical summary

Your result

Let’s calculate.

Use the Calculate button to see your result.

Review the method below for assumptions and conventions.

How to use this tool

  1. Enter observed counts, expected counts, significance level.
  2. Select Calculate to view the result.
  3. Check the method and assumptions below before using the result.

The method, explained

χ² = sum[(observed−expected)²/expected]. Degrees of freedom = categories−1; no model parameters may be estimated from these observations.

A WORKED EXAMPLE

Using observed counts = 18, 22, 25, 15, expected counts = 20, 20, 20, 20, significance level = 0.05, the result is 0.407301567 probability. Change these example inputs to match your task; use the method above to check each step.

What to keep in mind

Categories are mutually exclusive. Expected counts must be specified independently of the observed data. Sparse categories need a different test or a justified combination. A descriptive or probability calculation under the stated assumptions. Check the sample design and model before interpreting results.

Reference: NIST: statistical methods handbook

Common questions

Should I enter expected percentages or counts?

Enter expected counts that add to the observed total. For example, an expected share of 25% in a sample of 80 corresponds to an expected count of 20.

Can expected counts be fitted from these same observations?

This page assumes a fully specified model and uses categories minus one degrees of freedom. If you estimate model parameters from the observations, this degrees-of-freedom rule is not appropriate.

Methodology maintained by ClarityKit. How these tools are built and checked.