Chi-Square Test Calculator for Two-Variant A/B Tests
Compare two variants from an A/B test and instantly see the Pearson chi-square statistic, the p-value, and whether the difference in conversion rate is statistically significant.
How the chi-square test works
An A/B test produces a 2×2 contingency table: each variant has a count of conversions and non-conversions. The Pearson chi-square test of independence asks whether conversion outcome is independent of which variant a visitor saw. If the variants truly performed the same, the observed counts should match the expected counts implied by the pooled conversion rate.
For each of the four cells we compute the expected count as (row total × column total) / grand total, then sum the squared, normalized differences:
With a 2×2 table there is 1 degree of freedom. The resulting χ² value is converted to a p-value using the chi-square distribution. Because df = 1, the p-value equals the two-tailed normal tail probability of √χ², so this calculator uses an accurate error-function approximation rather than a lookup table. A small p-value (below your chosen α) means the observed gap between the two conversion rates is unlikely to be random noise, so you reject the null hypothesis of "no difference."
This is mathematically equivalent to a two-proportion z-test without continuity correction, which is why the same data drives confidence intervals and sample-size planning. Always confirm each variant has at least a handful of expected conversions; with very small samples the chi-square approximation degrades and an exact (Fisher) test is preferable. Enter your real numbers above to see the verdict update live as you type.