Chi-square test calculator (test of independence)
Tests whether two categorical variables are associated. Enter the observed counts in a contingency table; get χ², df, p, expected counts and Cramér’s V.
Or skip the manual work
In the app, you chat with your data — the AI runs the analysis and writes it up.
Free accounts include AI chat, data analysis, and every tool on this site.
When to use this
Use the chi-square test of independence when each case falls into one category on each of two categorical variables — pass/fail by teaching format, diagnosis by treatment arm, preference by country — and you want to know whether the two classifications are related. The test compares the observed counts with the counts expected if the variables were independent; a large χ² means the pattern in your table is unlikely under independence. Cramér’s V then expresses the strength of the association on a 0–1 scale, which matters because with large samples even trivial associations become “significant”.
Key assumptions
- Each observation is independent and appears in exactly one cell (no repeated measures).
- The data are counts (frequencies), not percentages, proportions or means.
- Expected counts are at least 5 in (about 80% of) cells — the calculator warns when this fails.
- Categories are mutually exclusive and exhaustive.
Common mistakes
- Entering percentages instead of raw counts — the test is only valid on frequencies.
- Using chi-square on paired/repeated categorical data (use McNemar’s test instead).
- Ignoring the low-expected-count warning; for small 2×2 tables use Fisher’s exact test.
- Reporting p without Cramér’s V, so readers cannot judge the strength of the association.
Frequently asked questions
What if my expected counts are below 5?
How do I interpret Cramér’s V?
Can I use this for a 3×4 (or larger) table?
Related free tools
Stop copying numbers between tools
Inside Kahubi, the AI agent runs this analysis directly on your uploaded dataset — then writes the results section in your own writing style, with the statistics reported correctly.