This calculator tests whether two categorical variables are related, useful for researchers, analysts, and anyone working with a contingency table.
The interactive chi-square calculator loads right here. If it hasn't appeared, refresh the page.
Enter the observed count for each combination of categories in the contingency table, then calculate the test statistic, degrees of freedom, and p-value.
For each cell, expected count = row total × column total / grand total. Then chi-square = sum of (observed count - expected count)^2 / expected count, and degrees of freedom = (number of rows - 1) × (number of columns - 1).
Suppose 100 customers choose tea or coffee, split by two age groups, with observed counts of 30, 20, 15, and 35. The calculator finds the expected counts, adds the four cell contributions, and compares the resulting chi-square statistic with 1 degree of freedom to produce a p-value.
A small p-value suggests the variables are associated rather than independent. A common cutoff is 0.05, but the cutoff should be chosen before looking at the result.
The usual chi-square approximation may be unreliable when expected counts are too low. If several expected counts are below 5, consider combining sensible categories or using Fisher's exact test.
More from DoesWhat: free calculators · emoji meanings · quick answers · the DoesWhat blog