Calculator Scope

Calculator Scope - Smart Online Calculators for Everything

From math, science, finance, health, and construction to marketing, text tools, developer utilities, and more. All calculators in one fast, accurate, easy-to-use platform.

Chi-Square Goodness-of-Fit Test Calculator

Chi-Square Goodness-of-Fit Test Calculator

Result
Calculator Scope
Advertisement 1
Advertisement 2
A chi-square goodness-of-fit test checks whether observed category counts match an expected distribution, e.g. testing if a die is fair by comparing actual roll counts to the expected even split.

Enter your observed counts for each category and the corresponding expected counts (comma-separated, in matching order). This calculates the chi-square statistic and its p-value, testing whether the difference between what you observed and what you expected is larger than random chance would typically produce.

Advertisement 3
  • Formula: χ² = Σ ((observed − expected)² ÷ expected), summed across all categories, with degrees of freedom = number of categories − 1.
  • Categories must be mutually exclusive counts, not percentages: this test works on actual frequency counts (e.g. "43 red, 31 blue, 26 green"), not proportions or percentages.
  • A small p-value means the observed data doesn't fit the expected pattern well: a low p-value (commonly below 0.05) suggests the categories deviate from what you expected by more than chance alone would explain.

What counts as "expected" values in this test?

The expected values represent what you'd predict under some hypothesis — for example, if you expect a fair six-sided die rolled 120 times to land on each face equally often, your expected value for each face would be 20.

Do the observed and expected lists need to sum to the same total?

They should — the goodness-of-fit test compares how the total is distributed across categories, so mismatched totals (e.g. observed summing to 100 but expected summing to 90) will distort the result.