Chi-Square Calculator

Run a chi-square goodness-of-fit or test of independence with chi-square statistic, degrees of freedom, and p-value.

Frequently Asked Questions

Why must I use counts, not percentages?

The chi-square formula divides by the expected count E, which acts as a variance estimate. If you substitute proportions or percentages, the denominator no longer has the right units and the resulting statistic does not follow a chi-square distribution.

What should I do when expected counts are less than 5?

Combine adjacent categories to raise expected counts above 5, or use Fisher's exact test (for 2×2 tables), or a Monte Carlo permutation test (for larger tables). The chi-square approximation is unreliable with small expectations.

Can chi-square detect the direction of an association?

No. It only tests whether the observed distribution departs from the null. To understand direction and magnitude, examine standardized residuals and compute a measure like Cramér's V or the phi coefficient.

What is the difference between goodness-of-fit and test of independence?

Goodness-of-fit tests whether a single variable matches a specified distribution. Test of independence tests whether two variables in a contingency table are related. Computationally, both use the same χ² = Σ(O−E)²÷E formula, differing only in how expected values are determined.

Important Disclaimer: Estimates for informational purposes only.

This calculator provides estimates for informational purposes only. Results are based on assumptions and may not reflect actual outcomes. Consult qualified professionals in relevant fields before making important decisions based on these results.