Chi-Square Goodness of Fit Calculator

Reviewed by CalcMulti Editorial Team·Last updated: ·Statistics Hub

The chi-square goodness of fit test determines whether observed category frequencies match a theoretically expected distribution. It answers: "Does my data fit the expected pattern?"

Enter up to 10 categories with their observed counts. Specify expected counts (or leave blank for equal distribution). The calculator computes χ², degrees of freedom, p-value, and effect size.

Formula

χ² = Σ (Oᵢ − Eᵢ)² / Eᵢ df = k − 1

Oᵢ
observed frequency in category i
Eᵢ
expected frequency in category i
k
number of categories
df
degrees of freedom = k − 1
w
Cohen's w = √(χ²/n) — effect size

Enter Category Data

Leave "Expected" blank for a uniform distribution (equal expected frequencies).

CategoryObservedExpected (opt.)

Chi-Square Goodness of Fit: Formula

χ² = Σ (Oᵢ − Eᵢ)² / Eᵢ

df = k − 1 · Effect size: w = √(χ²/n)

SymbolMeaning
OᵢObserved count in category i (from your data)
EᵢExpected count in category i under H₀ (can be theoretical or uniform)
kNumber of categories
dfDegrees of freedom = k − 1 (one constraint: observed total is fixed)
Cohen's w√(χ²/n): small ≥ 0.1 · medium ≥ 0.3 · large ≥ 0.5

Worked Example: Are Support Tickets Uniform Across Weekdays?

A support team logs tickets by day: Mon 18, Tue 22, Wed 15, Thu 25, Fri 20 (n = 100). Is there a significant difference in ticket volume across days (H₀: uniform distribution)?

DayOE (uniform)O − E(O−E)²/E
Mon1820-20.200
Tue222020.200
Wed1520-51.250
Thu252051.250
Fri202000.000
Total1001002.900

χ² = 2.900, df = 5 − 1 = 4

Critical value at α = 0.05, df = 4: χ²crit = 9.488

Conclusion: 2.900 < 9.488 → Fail to reject H₀. No significant variation across weekdays (p ≈ 0.575).

Assumptions & Chi-Square Critical Values

Assumptions

  • Categories are mutually exclusive and exhaustive
  • Observations are independent
  • All expected frequencies ≥ 5 (rule of thumb)
  • At minimum, no expected cell is 0
  • Data are counts (not proportions or percentages)

χ² critical values (α = 0.05)

df (k−1)χ²0.05χ²0.01
13.8416.635
25.9919.210
37.81511.345
49.48813.277
511.07015.086
612.59216.812
916.91921.666

Disclaimer

All expected frequencies should be ≥ 5. Combine categories if this condition is violated.

Frequently Asked Questions