All free tools
Free · no signup

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.

Let the AI do this — sign up freeUpload your data, get the write-up back.

Or skip the manual work

In the app, you chat with your data — the AI runs the analysis and writes it up.

Kahubi AILive in the app
Typing numbers in by hand works — but inside Kahubi you just upload your dataset and ask. I check the assumptions, run the right test, and hand you an APA-ready results section. Try me.

Free accounts include AI chat, data analysis, and every tool on this site.

Your data

Enter the observed frequency (count) for each combination. Edit the category labels and variable names to match your data; add rows or columns as needed.

Runs in your browser — data never leaves this page.

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?
The χ² distribution is an approximation that becomes unreliable with small expected counts. For a 2×2 table, switch to Fisher’s exact test; for larger tables, consider combining sparse categories or collecting more data. This calculator flags the affected cells.
How do I interpret Cramér’s V?
V ranges from 0 (no association) to 1 (perfect association). For tables where the smaller dimension is 2, common benchmarks are .10 small, .30 medium, .50 large. Always report it alongside χ² and p.
Can I use this for a 3×4 (or larger) table?
Yes — add rows and columns as needed; the test handles any r×c table. The degrees of freedom are (rows − 1) × (columns − 1).

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.