Chi-Square Test Calculator
Test whether two categorical variables are related. Paste your contingency table with one row per line and counts separated by spaces or commas.
How to enter your data: Enter your numbers as a table of counts, where each count is how many people or items fall into one combination. Put each row group on its own line, and separate the counts in that row with commas. For example, one line for "Men" with coffee and tea counts (40, 60), and a second line for "Women" (70, 30). Use plain whole numbers, not percentages.
A Chi-Square Test of Independence checks whether two things you have sorted people or items into are connected, or just happen to line up by chance. For example, it can tell you if gender and drink choice are linked, or if that pattern is probably random. You give it a table of counts, and it gives back a p-value that tells you how likely the link is real.
Built into PaperSurvey.io
Skip the copy-paste. Scan your paper or web surveys and PaperSurvey computes these metrics automatically on your real data, ready to export to Excel, SPSS and R.
Where it is used
- Small-business owners: A cafe owner checks whether men and women differ in choosing coffee versus tea, using counts from a quick customer survey.
- Teachers: A teacher tests whether students who attended extra revision sessions were more likely to pass or fail than those who did not.
- HR staff: An HR officer looks at whether staff in different departments differ in whether they said yes or no to a new flexible-hours policy.
What the chi-square test does
The chi-square test of independence checks whether two categorical variables (for example gender and product preference) are associated. A small p-value (below 0.05) means the variables are very likely related. Cramér’s V measures how strong that association is.
When should you use it?
Use this test when you have two questions that each sort people into named groups, and you want to know if the two are related. Both questions must be categories, not measurements. Good examples are gender (man or woman) against choice (coffee or tea), or department (sales or support) against answer (yes or no). You need the actual head counts for each combination, such as how many women chose tea. It does not work with averages, scores, or numbers like age or income.
What does the result mean?
The main answer is the p-value, a number between 0 and 1. It tells you how likely you would see a pattern this strong purely by chance if the two things were truly unrelated. A small p-value means the link is probably real. The widely used cut-off is 0.05: if the p-value is below 0.05, people usually call the relationship statistically significant, meaning it is unlikely to be luck. A p-value above 0.05 means you do not have strong evidence of a real link. The chi-square number itself just measures how far your counts sit from what pure chance would produce, and bigger means a stronger signal.
Mistakes to avoid
Do not type in percentages or averages. This test needs raw whole-number counts of people or items. Make sure each person is counted only once, in one box. Be careful with very small groups: if the expected number in any box is below about five, the result can be unreliable, so try to collect more responses. Also remember this test only tells you whether two things are linked, not which one causes the other, and not how big or useful the link is.
How to use this calculator
- Sort your responses into two categories and count how many people fall into each combination.
- Enter the counts as a table: put each row group on its own line, with the counts separated by commas.
- Double-check that every count is a whole number and that each person is counted only once.
- Read the p-value: if it is below 0.05, the two categories are likely related; if it is above 0.05, there is no strong evidence of a link.
Worked example
Suppose a cafe owner surveys 200 customers. Among 100 men, 40 chose coffee and 60 chose tea. Among 100 women, 70 chose coffee and 30 chose tea. Entered as two rows (40, 60 on one line and 70, 30 on the next), the calculator returns a chi-square value of about 18.2 and a p-value well below 0.001. Because that p-value is far below 0.05, the result shows that drink choice really does differ between men and women, and is very unlikely to be chance.
Frequently asked questions
How do I enter my data?
Put each category on its own line and separate the group counts with commas or spaces. For example, a 2×2 table is two lines of two numbers.
What numbers do I type into each box?
Type the count of how many people or items fall into each combination of your two categories. For example, the number of women who chose tea. Always use whole numbers, never percentages.
Where do I get these numbers?
Count them from your survey answers, sign-up sheet, spreadsheet, or sales records. Group your responses by the two things you are comparing, then count how many fall into each combination.
What is a p-value in plain words?
It is the chance of seeing a pattern this strong if the two things were actually unrelated. A low p-value suggests the link is real, not just luck.
What p-value counts as a real result?
The common rule is that a p-value below 0.05 means the relationship is statistically significant. Above 0.05 means you do not have strong evidence of a link.
Does a significant result mean one thing causes the other?
No. The test only shows that two things tend to go together. It cannot prove that one causes the other, since something else could be behind the pattern.
Related calculators
Get Started with PaperSurvey.io Software
Start your 14-day free trial now, no credit card required.