Chi-Square Calculator
Settings
Use counts, not percentages, and check that expected counts are large enough (often at least 5).
Results
Action
Use this Chi-Square Calculator for goodness-of-fit tests, tests of independence, or right-tail chi-square distribution calculations.
Calculation Method
The chi-square statistic is:
χ² = Σ[(O − E)² ÷ E]
Where O is the observed count and E is the expected count.
For a test of independence:
Expected count = row total × column total ÷ grand total
df = (rows − 1) × (columns − 1)
For a goodness-of-fit test with fully specified expected probabilities:
Expected count = total sample size × expected proportion
df = number of categories − 1
Example
Suppose three categories have observed counts of 20, 30, and 50, while equal frequencies are expected.
Total observations = 100, so each expected count is approximately 33.33.
χ² ≈ (20−33.33)²/33.33 + (30−33.33)²/33.33 + (50−33.33)²/33.33
χ² ≈ 14.0
With three categories:
df = 3 − 1 = 2
Important Note
Chi-square tests use counts, not percentages alone. Observations should be appropriately independent, and expected counts must be sufficiently large for the chi-square approximation to be reliable. A significant result does not prove causation.