← All Tools

Chi-Square Test Calculator

Run Pearson's χ² test end-to-end in your browser. Pick goodness of fit when you have a single row of observed counts against a theoretical distribution, or independence when you have an r×c contingency table. Get χ², degrees of freedom, the p-value, critical value at your α, Cramér's V, and a per-cell standardised-residual heat map.

Quick reference

Goodness of fit asks whether one categorical variable follows a claimed distribution. Roll a die 100 times, count each face, and test against expected = 100/6 per face. Degrees of freedom = k − 1 − p where k is the number of bins and p is the number of distribution parameters you estimated from the data (set the "Extra parameters estimated" field to p).

Independence asks whether two categorical variables move together in an r×c contingency table. Expected count in cell (i, j) = rowSum_i × colSum_j / n. Degrees of freedom = (r − 1)(c − 1).

Effect size. Cramér's V = √(χ² / (n · min(r − 1, c − 1))) and is bounded by 0…1. For a 2×2 table it collapses to the phi (φ) coefficient. A significant p-value with a tiny V (< 0.05) means a real but tiny effect — big samples make trivial associations pass. Yates' correction subtracts ½ from each |O − E| in a 2×2 table before squaring; it's conservative and mostly used when any expected cell drops below 5.