✓ Effortless Math · Free Tool

Chi-Square Calculator — Goodness of Fit Test

Enter your observed counts and (optionally) the expected counts — get the χ² statistic, the degrees of freedom, the p-value, a per-category breakdown, and full step-by-step working.

Statistic:  χ² = Σ (O − E)² / E

If expected is blank, each category is assumed equal (total ÷ number of categories). Both lists must have the same number of values, and every expected count must be greater than 0.

Results

Chi-square statistic & p-value
χ² statistic
Degrees of freedom — k − 1
p-value — P(χ² ≥ stat)

Per-category breakdown — (O − E)² / E

CategoryOEO − E(O − E)²/E
χ² = sum of contributions

Step-by-step (goodness of fit)