Chi-square calculator
Test of independence for a contingency table, or goodness of fit for one variable. The counts stay in this tab.
Result
Your counts
| Column 1 | Column 2 | |
|---|---|---|
| Row 1 | ||
| Row 2 |
- Chi-square (χ²)
- 1.0989
- Degrees of freedom
- 1
- p-value
- 0.2945
- Total (N)
- 100
- Cramér's V
- 0.1048
Not significant at α = 0.05. APA style: χ²(1, N = 100) = 1.10, p = .295, V = .10
Expected counts
| Column 1 | Column 2 | |
|---|---|---|
| Row 1 | 17.5 | 17.5 |
| Row 2 | 32.5 | 32.5 |
How to use this tool
Run a chi-square test in three steps.
Choose the test
Independence for a table of two variables, or goodness of fit for one variable against expected shares.
Enter the counts
Set the number of rows and columns (or categories) and type the observed counts.
Read the result
See χ², df, the p-value, Cramér's V and the expected counts, with a warning when they are too small.
FAQ
What does a chi-square test of independence tell me?
Whether two categorical variables are related, for example gender and preferred product. It compares the counts in your table with the counts expected if the variables were unrelated.
How is chi-square calculated?
Each expected count is row total × column total ÷ grand total. χ² adds (observed − expected)² ÷ expected over every cell, with (rows − 1) × (columns − 1) degrees of freedom.
What is a goodness-of-fit test?
It checks whether counts in one variable match expected shares, such as a fair die (all equal) or a 9 : 3 : 3 : 1 ratio. Choose Custom shares to type the expected proportions or counts.
When is a chi-square test not valid?
When expected counts are small: as a rule, no more than 20 % of cells below 5 and none below 1. The calculator warns you; for small 2 × 2 tables use Fisher's exact test instead.
What is Cramér's V?
An effect size for the strength of the relationship, from 0 (none) to 1 (perfect). It is √(χ² ÷ (N × (smaller of rows, columns − 1))).