Free Chi-Square
Calculator
Test for independence between categorical variables. Get your chi-square statistic, degrees of freedom, and p-value instantly.
Test Results
Enter your frequencies and calculate.
What is a Chi-Square Test?
The chi-square test of independence determines whether there's a significant relationship between two categorical variables. It compares the observed frequencies in your data with the frequencies you'd expect if the variables were independent.
For example, you might test whether gender is related to product preference. The test tells you if any observed pattern is likely due to a real relationship or just random chance.
The Formula
- O = Observed frequency (your actual data)
- E = Expected frequency (if variables were independent)
- Σ = Sum across all cells
Frequently Asked Questions
When should I use a chi-square test?
Use a chi-square test when you have categorical data (not continuous measurements) and want to test if two variables are independent. Common examples: survey responses by demographic group or A/B test results.
What's the minimum sample size for chi-square?
A rule of thumb is that expected frequencies should be at least 5 in each cell. With smaller expected counts, consider using Fisher's exact test instead, especially for 2×2 tables.
Can I use percentages instead of counts?
No, chi-square requires actual frequency counts (whole numbers), not percentages or proportions. If you only have percentages, multiply by your total sample size to get counts.
What does a significant result mean?
A p-value below 0.05 means there's likely a real relationship between your variables. However, significance doesn't tell you how strong the relationship is.