About Chi-Square Test of Independence Calculator
This chi-square test of independence calculator takes a contingency table of counts, adds or removes rows and columns as you need, and tests whether the two categorical variables are associated. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.
The page opens on a 3 by 4 table. The result shows the chi-square statistic, degrees of freedom, p-value, critical value and Cramér’s V, and below it the expected counts and each cell’s contribution so you can see where the association comes from.
On a phone the table scrolls sideways inside its own frame and every cell is a 44 pixel target. Use the Row and Column buttons to resize it, up to 10 by 10. A warning appears if any expected count is below 5, as in the small 2 by 2 example.
How to use Chi-Square Test of Independence Calculator
- Choose the test: goodness of fit, independence or critical value.
- For goodness of fit, type the observed counts and choose how the expected values are given. For independence, type the counts into the table and add or remove rows and columns as needed.
- Choose a significance level, usually 0.05.
- Read the chi-square statistic, the degrees of freedom, the p-value, the critical value and, for a table, Cramér’s V.
- Check the warning about small expected counts, then open the expected counts, contributions and step-by-step working.
Features
- Goodness of fit with equal, proportional or custom expected values, and an option for estimated parameters.
- Test of independence with an editable contingency table up to 10 by 10, usable on a phone.
- Expected counts and each cell’s contribution to chi-square.
- Cramér’s V effect size with a plain-language label.
- A warning when any expected count is under 5.
- Critical value look-up for any degrees of freedom and significance level.
- A bell curve with the rejection region and statistic, and step-by-step KaTeX working.
Test of independence
Expected counts assume the variables are independent, so each depends only on the row and column totals.
E_ij = (row i total)(column j total) / N
χ² = Σ_ij (O_ij − E_ij)² / E_ij, df = (r − 1)(c − 1)Worked examples
90 60 104 95 / 30 50 51 20 / 30 40 45 35 gives χ² = 24.57, df = 6, p = 0.0004, V = 0.137
The 3 by 4 example of the Wikipedia chi-squared test article.
30 10 / 20 40 gives χ² = 16.67, df = 1, p = < 0.0001, V = 0.408
3 1 / 2 4 gives χ² = 1.667, p = 0.197, with a small-count warning
Every expected count is under 5, so use an exact test instead.
Privacy: how it works
- The test is calculated by code in your own browser tab. Your counts are not sent to Ulkaa or any other server.
- There is no account and nothing is stored once you close the tab.
Tips
- Enter counts, not percentages. Percentages change the sample size and so the statistic.
- For a 2 by 2 table the test of independence with no continuity correction can be a little too liberal. Compare with Fisher’s exact test when counts are small.
- Look at the contributions to see which cells drive the result, instead of stopping at the p-value.
- Rows and columns of a table must each contain at least one non-zero count.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Your counts are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Your counts are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
What is the null hypothesis?
That the two variables are independent: knowing the row category tells you nothing about the column category. A small p-value is evidence of an association.
Does chi-square show which cells differ?
Not directly, but the contributions table shows which cells depart most from their expected counts, which is where to look first.
More Chi-Square Calculator pages
- Chi-Square CalculatorRun a chi-square goodness-of-fit test or a test of independence on a contingency table, with expected counts and Cramér’s V.
- Chi-Square Goodness of Fit CalculatorType the observed counts and see whether they match what you expected.
- Chi-Square Critical Value TableLook up the chi-square critical value for any degrees of freedom and significance level.