Chi-Square Test Calculator

Perform a chi-square goodness-of-fit or independence test. Enter observed and expected frequencies to calculate the chi-square statistic and p-value.

CHI-SQUARE STATISTIC
--
Degrees of Freedom
--
P-Value (approx)
--
Critical Value
--
Significant?
--

What Is the Chi-Square Test?

The chi-square test is a non-parametric statistical test used to compare observed frequencies with expected frequencies. It measures how well observed data fits expected patterns. The two main variants are the goodness-of-fit test (one variable) and the test of independence (two variables in a contingency table).

Developed by Karl Pearson in 1900, it is one of the most widely used statistical tests for categorical data analysis.

Formula

χ² = Σ (O_i - E_i)² / E_i
df = (categories - 1) for goodness-of-fit

Critical Values (α = 0.05)

dfCritical Value
13.841
25.991
37.815
511.070
1018.307

FAQ

When should I use chi-square?

Use it for categorical data when you want to test whether observed frequencies differ from expected frequencies, or whether two categorical variables are independent. Expected frequencies should be at least 5 in each cell.

What if expected frequencies are too small?

If expected frequencies are below 5, use Fisher's exact test or combine categories. The chi-square approximation is unreliable with very small expected counts.