About Chi-Square Calculator
This chi-square calculator is free, needs no sign-up and runs in your browser, so your counts are never uploaded. It runs the two chi-square tests that most courses and research projects use: the goodness-of-fit test, which asks whether observed counts match an expected distribution, and the test of independence, which asks whether two categorical variables are related.
For independence you work in a table editor. Add or remove rows and columns, type the counts, and the calculator shows the expected counts, each cell’s contribution to the statistic, the chi-square value, the degrees of freedom, the p-value, the critical value and Cramér’s V as a measure of how strong the association is. A warning appears when any expected count is below 5, because the chi-square approximation is then unreliable.
For goodness of fit, enter the observed counts and either equal expected counts, expected proportions such as a 9:3:3:1 ratio, or expected counts. A third mode looks up the chi-square critical value for any degrees of freedom and significance level. A bell curve shades the rejection region and marks your statistic.
How to use Chi-Square 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.
The formulas
Both tests add up the squared difference between each observed count and the count expected under the null hypothesis, divided by the expected count. A large total means the data are far from what the null hypothesis predicts.
χ² = Σ (O − E)² / E
goodness of fit df = k − 1 − m, E_i = N π_i
independence E_ij = (row i total × column j total) / N, df = (r − 1)(c − 1)
Cramér's V = √( χ² / (N · min(r − 1, c − 1)) )Worked examples
Die rolled 60 times: 5, 8, 9, 8, 10, 20 against 10 each gives χ² = 13.4, df = 5, p = 0.020, critical value 11.07
The 20 sixes contribute 10 of the 13.4. The die looks loaded at the 5% level.
Mendel's peas: 315, 108, 101, 32 against a 9:3:3:1 ratio gives χ² = 0.47, df = 3, p = 0.925
A very close fit (Fisher, 1936).
Table of 3 rows by 4 columns: 90 60 104 95 / 30 50 51 20 / 30 40 45 35 gives χ² = 24.57, df = 6, p = 0.0004, Cramér's V = 0.137
The 3 by 4 example on the Wikipedia page for the chi-squared test. Every expected count is above 5.
Chi-square critical values (right tail)
| Degrees of freedom | α = 0.10 | α = 0.05 | α = 0.01 |
|---|---|---|---|
| 1 | 2.706 | 3.841 | 6.635 |
| 2 | 4.605 | 5.991 | 9.21 |
| 3 | 6.251 | 7.815 | 11.34 |
| 4 | 7.779 | 9.488 | 13.28 |
| 5 | 9.236 | 11.07 | 15.09 |
| 10 | 15.99 | 18.31 | 23.21 |
| 20 | 28.41 | 31.41 | 37.57 |
Good to know
Expected counts under 5
The chi-square p-value is an approximation that works well when expected counts are reasonably large. The common rule of thumb is that all expected counts should be at least 5 (some authors allow 80% of cells at 5 or more and none under 1). When the rule fails, combine sparse categories if that makes sense, or use an exact method such as Fisher’s exact test for 2 by 2 tables. This calculator warns you but does not run exact tests or apply Yates’ continuity correction.
Statistical and practical significance
With a large sample, even a tiny association gives a small p-value. Cramér’s V ranges from 0 (no association) to 1 (perfect). As a rough guide, below 0.1 is negligible, 0.1 to 0.3 small, 0.3 to 0.5 medium and above 0.5 large, although the labels depend on the table size. Chi-square tests the existence of an association, not its direction or cause.
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 a chi-square test?
A test that compares observed counts with the counts you would expect if a null hypothesis were true. The goodness-of-fit version tests one categorical variable against an expected distribution, and the independence version tests whether two categorical variables are related.
How do I find the degrees of freedom?
For goodness of fit it is the number of categories minus 1 (minus any parameters estimated from the data). For a table it is (rows minus 1) times (columns minus 1).
What does it mean if an expected count is below 5?
The chi-square approximation may be unreliable. Combine small categories or use an exact test. The calculator shows a warning whenever any expected count is under 5.
What is Cramér's V?
A measure of association strength for a table, from 0 to 1. It is the square root of chi-square divided by the sample size times the smaller of rows minus 1 and columns minus 1.
Can I use percentages or proportions?
For the expected values of a goodness-of-fit test, yes, you can type proportions or a ratio such as 9, 3, 3, 1. The observed values and the table must be counts.
How large can the table be?
The editor allows up to 10 rows and 10 columns, and scrolls sideways on narrow screens.
Does it apply a continuity correction for 2 by 2 tables?
No. It reports the standard Pearson chi-square. For small 2 by 2 tables consider Fisher’s exact test or Yates’ correction, which this calculator does not compute.
Popular Chi-Square Calculator pages
- Chi-Square Goodness of Fit CalculatorType the observed counts and see whether they match what you expected.
- Chi-Square Test of Independence CalculatorEnter a table of counts and see whether the two variables are related.
- Chi-Square Critical Value TableLook up the chi-square critical value for any degrees of freedom and significance level.