Chi-Square Test of Independence

Chi-square test of independence on a contingency table with Cramer's V.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter a contingency table with rows separated by semicolons and cells by commas. The test reports χ², df, p, Cramér's V and a low-count warning.

How to use

1
Step 1
Type the table, e.g. 30,10;20,40.
2
Step 2
Keep each row the same length.
3
Step 3
Press Calculate.

How it works

Expected count in each cell is row total × column total ÷ grand total. A large χ² means the variables are associated. Cramér's V scales the statistic to 0–1 so you can judge effect size separately from significance.

E = (row total × column total) ÷ N      χ² = Σ (O − E)² ÷ E      V = √(χ² ÷ (N·min(r−1, c−1)))

Worked example

A 2×2 table

Input
30,10;20,40
Output
χ²(1) = 16.67, p < .001, V = .41
Walkthrough
Row totals 40 and 60, column totals 50 and 50, N = 100. Expected 20, 20, 30, 30. χ² = 2 × (100 ÷ 20) + 2 × (100 ÷ 30) = 16.67; V = √(16.67 ÷ 100) = 0.408.

Limitations

  • Counts only, no percentages.
  • No Yates correction is applied to 2×2 tables.
  • Small expected counts trigger a warning.

Questions

How do I get df?
(rows − 1) × (columns − 1); a 2×2 table has 1.
What is a good Cramér's V?
As a rough guide, 0.1 is small, 0.3 medium and 0.5 large. Here 0.41 is medium to large.
What if expected counts are below 5?
Use Fisher's exact test or merge categories; the tool flags the problem.

Features

  • Cramér's V
  • Low-count warning
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • P-values and significance tests

    Khan Academy

    How critical values and p-values connect on Statistics Hub.

    Watch on YouTube
  • Hypothesis testing and p-values

    StatQuest with Josh Starmer

    Intuition for t/z/χ² decision rules.

    Watch on YouTube