Chi-square test

Pearson χ² goodness-of-fit test for observed and expected categorical counts.

About this tool

Results update directly as you edit. Input drafts, including unfinished values and temporarily hidden rows, remain in local browser storage. Custom expected counts are preserved when you switch to equal probabilities.

Equal probabilities uses N/k without rounding. Custom expectations must be positive and sum to N. Counts and sample size must be whole numbers up to 9,007,199,254,740,991. In uniform mode the common expectation is displayed once, rounded for readability.

Pearson χ² = Σ(O−E)²/E uses k−1 degrees of freedom, assuming independent observations, predefined categories and no parameters estimated from this sample. The p-value is the approximate upper-tail probability under the specified distribution, not the probability that the distribution is true. Reject if p<α; a non-significant result does not prove fairness. Expected counts below 5 trigger an approximation warning.

Tiny positive values use scientific notation. Unrepresentable small tails are marked; ≈1 indicates rounding near one. This is not a contingency-table independence test.