Skip to calculators
calcmintly

Chi-Square Goodness of Fit

Compare observed category counts with positive expected counts.

Add to workspace

Your numbers

Local calculations. Results are estimates, not professional advice.

Chi-square statistic

—

Use consistent units. The result follows the assumptions you enter.

Formula

Use χ² = Σ(Oᵢ−Eᵢ)²/Eᵢ and df = k−1−p. Oᵢ and Eᵢ are observed and expected counts, k is category count, and p is parameters estimated from the same data. The p-value is the upper chi-square tail.

Compare observed category counts with positive expected counts.

Worked example

Observed counts
10, 20, 30
Expected counts
20, 20, 20
Parameters estimated from the same data
0
Chi-square statistic
10
Degrees of freedom
2
p-value
0.00673794699909

Scope and limitations

Use consistent units. The result follows the assumptions you enter.

Inputs are checked for missing values and allowed ranges. A result outside the finite numeric range is not displayed. Rounding affects display, while the calculation uses the model’s numeric precision.

Check your units and assumptions before relying on a result. Changing a label does not convert a currency or physical unit.

Formula version: b6c7ff36547c · Example checked:

Methodology

Related tools