About the Chi-Square Calculator
The chi-square test compares counts. It can tell you whether two categories seem to be linked, such as whether a customer's plan depends on their country, or whether observed counts match what you expected, such as whether a die is fair. Type a table of counts with one row per line for the independence test, or a single list of counts for goodness of fit. The calculator returns the chi-square statistic, degrees of freedom, p-value, the expected counts and, for tables, Cramér's V as a measure of strength. It also warns when expected counts are small. Everything is calculated in your browser.
Updated October 2026
How to use the Chi-Square Calculator
- 1Pick the independence test for a table or goodness of fit for one list.
- 2Type or paste your counts, with one table row per line.
- 3For goodness of fit, optionally add expected counts or shares.
- 4Read the p-value and the verdict.
- 5Look at the expected counts and Cramér's V for more detail.
How the statistic is built
For every cell, the test takes the difference between what you saw and what you expected, squares it and divides by what you expected. The sum of those pieces is the chi-square value. A big value means the data sit far from the expected pattern.
The p-value then comes from the chi-square distribution with the right degrees of freedom. For a table that is rows minus one times columns minus one, and for goodness of fit it is the number of categories minus one.
Examples to try
- Table 10 20 over 30 40: there is no clear link, p is about 0.37.
- Counts 16 18 16 14 12 12 for six die faces: consistent with a fair die.
- Counts 90 5 5 with expected 34 33 33: a clear mismatch, p close to 0.
- Survey answers split by age group in a 4 by 3 table.
- Conversions by traffic source across several landing pages.
Related tools
For comparing two conversion rates directly, use the A/B Test Significance Calculator, and for comparing averages use the T-Test Calculator. The P-Value Calculator converts a test score into a probability, the Probability Calculator covers basic chances, and the Binomial Distribution Calculator is the exact route for a single yes or no outcome. A p-value is not proof, so read it together with the sample size.
Features
- Test of independence for any table size
- Goodness of fit with equal or custom expectations
- Chi-square, degrees of freedom and exact p-value
- Cramér's V effect size
- Expected counts shown
- Warning for small expected counts
- Private, nothing uploaded
Frequently asked questions
What does the chi-square test tell me?
It tells you whether the counts you observed differ from the counts you would expect by chance. A small p-value means the difference is unlikely to be random.
When do I use independence and when goodness of fit?
Use independence when each person falls into two categories, like plan and country, and you want to know if they are linked. Use goodness of fit when you have one category and a model for how common each value should be.
How are the expected counts worked out?
For a table, each expected count is the row total times the column total divided by the grand total. For goodness of fit, they are equal shares unless you provide your own.
What counts as a small expected count?
A common rule is that most expected counts should be at least 5. If many are smaller, the p-value may be unreliable and an exact test is better.
What is Cramér's V?
It scales the chi-square value to between 0 and 1, so you can see how strong the link is. Around 0.1 is weak, 0.3 is moderate and 0.5 is strong.
Can I enter percentages?
Use counts for observed values. For goodness of fit, the expected values may be shares such as 50 30 20, because they are scaled to the total.
Why does it say a row adds up to zero?
A row or column with no counts cannot have an expected value, so remove it and run the test again.