Categorical data

Chi-Square Calculator

Test whether a binary outcome is associated with group membership using a 2 × 2 chi-square test of independence.

Why use this calculator

Check whether two categorical variables move together

A chi-square test compares the counts you observed with the counts expected if group and outcome were unrelated. It is useful for questions such as whether treatment is associated with conversion, error status, or another yes-or-no outcome.

2 × 2 contingency table

Are group and outcome independent?

Enter every observation in each cell. Rename the labels to match your outcome.

ConvertedDid not convert
Control
Treatment

P-value

—

χ² statistic · df 1

—

Cramér’s V

—

Smallest expected count

—

Pearson’s chi-square test of independence without continuity correction.

What does a chi-square test tell you?

The test asks whether the distribution of a categorical outcome differs across groups more than expected from random variation. A small p-value is evidence against independence; it does not by itself say which group is better or whether the difference is practically important.

For a 2 × 2 table, the chi-square test is closely related to the two-proportion test. In an A/B test, pair it with the group rates, absolute difference, a confidence interval, and a pre-specified decision rule.

When to use a chi-square test

Use counts, not percentages

The calculation needs the number of observations in every cell. Percentages alone omit the sample size that determines the uncertainty in the comparison.

Check expected counts

The usual chi-square approximation is less reliable when expected cell counts are small. If an expected count is below about five, consider Fisher’s exact test or combine categories only when that is justified before analysis.

Keep observations independent

Each unit should appear in one cell only. Repeated observations per user, clustered assignment, or post-treatment filtering can require a different analysis.