Chi-Square Calculator

Calculate the chi-square statistic for goodness of fit or test of independence. Get degrees of freedom, p-value approximation, Cramér's V effect size, and interpretation.

Chi-Square Statistic (χ²)
Degrees of Freedom
p-value (approximation)
Significant at α = 0.05?
Extended More scenarios, charts & detailed breakdown
χ² Statistic
Degrees of Freedom
Result
Professional Full parameters & maximum detail

Test Statistics

χ² Statistic (2×3 table)
Degrees of Freedom
Cramér's V (effect size)

Cell Details

Expected Frequencies
Standardized Residuals

Corrections & Interpretation

Yates-Corrected χ² (if 2×2)
Interpretation

How to Use This Calculator

Enter observed values and expected values as comma-separated numbers (same length). The calculator computes the χ² statistic, degrees of freedom, and significance at α=0.05. Use the Test of Independence tab for a 2×2 contingency table with phi coefficient. Use Critical Value to look up the threshold for any df and significance level. The Professional tab handles a full 2×3 table with expected frequencies, residuals, and Cramér's V.

Formula

χ² = Σ [(O − E)² / E] • df = k − 1 (goodness of fit) or (r−1)(c−1) (independence) • Cramér's V = √(χ² / (n × min(r−1, c−1)))

Example

Observed: 20,30,25,25 | Expected: 25,25,25,25 → χ² = (5²/25)×4 = 4.0 → df = 3 → Not significant at α=0.05 (critical = 7.815)

Frequently Asked Questions

  • The chi-square test measures whether observed data differs significantly from expected data. It compares how well observed frequencies match expected frequencies under a hypothesis.
  • For goodness of fit: df = number of categories − 1. For a contingency table: df = (rows−1) × (columns−1). Degrees of freedom affect the critical value threshold.
  • If p < 0.05, you reject the null hypothesis at the 5% significance level. This means the observed distribution is significantly different from expected, and the result is unlikely due to chance.
  • Cramér's V measures the strength of association between two categorical variables. Values range from 0 (no association) to 1 (perfect association). Interpreted as: <0.1 negligible, 0.1–0.3 small, 0.3–0.5 medium, >0.5 large.
  • The Yates continuity correction adjusts the chi-square formula for 2×2 tables with small sample sizes to prevent overestimation of significance. It subtracts 0.5 from the absolute difference before squaring.

Related Calculators