Skip to main content

CHI-SQUARE CALCULATOR

Chi-square test calculator with expected counts and effect size.

Test whether two categorical variables are related, or whether counts match expected proportions. You get χ², degrees of freedom, the p value, Cramér's V, an expected-count check, and Fisher's exact test for small 2 × 2 tables.

COUNTS

Test of independence

BROWSER-ONLY

One row per group, one column per category. A header row of column names is optional. Paste straight from Excel or SPSS crosstabs.

METHOD

Chi-square test: formula, solved example, and reporting

Formula

χ² = Σ (O − E)² ÷ E, E = (row total × column total) ÷ N, df = (r − 1)(c − 1)

O is each observed count and E the count expected if the two variables were unrelated. A large χ² means the observed table is far from what independence predicts.

Solved example

100 students: 50 online and 50 in-person. 20 online and 30 in-person students passed. Every expected count is 25, so χ² = 4 × (5² ÷ 25) = 4.00 with df = 1, giving p = .046 and Cramér's V = .20: a small but significant association between study mode and passing.

What type of data is the chi-square test used for?

  • Two categorical variables (nominal or ordinal categories) counted per person
  • Each participant appears in exactly one cell
  • Counts, not percentages or means
  • Expected count of at least 5 in at least 80% of cells; otherwise use Fisher's exact test (2 × 2) or merge categories

Interpreting Cramér's V

  • ≈ .10 small association
  • ≈ .30 medium association
  • ≈ .50 or more large association
  • For tables larger than 2 × 2, these thresholds shrink as the smaller dimension grows (Cohen, 1988).

How to report it (APA style)

“A chi-square test of independence showed a significant association between study mode and exam outcome, χ²(1, N = 100) = 4.00, p = .046, Cramér's V = .20.” Include N in the brackets and report the effect size. The APA chi-square guide has templates for every case.

References

  • Pearson, K. (1900). On the criterion that a given system of deviations from the probable… Philosophical Magazine, 50(302), 157–175.
  • Cochran, W. G. (1954). Some methods for strengthening the common χ² tests. Biometrics, 10(4), 417–451.
  • Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Lawrence Erlbaum.