Tools / Chi Square Calculator

Chi Square Calculator

Paste a contingency table, one row per line, and get the chi-square statistic, degrees of freedom, p-value, and effect size.

χ² = Σ (O − E)² ÷ E · df = (rows − 1)(columns − 1)

Paste a table of counts to see the result

  1. 1

    Lay out the counts

    One row per line, values separated by commas. Rows are one variable and columns the other.

  2. 2

    Use raw counts only

    Whole numbers of people or events, never percentages or averages. That is the most common mistake with this test.

  3. 3

    Read the p-value

    Below 0.05 means the two variables are unlikely to be independent. Cramer's V tells you how strong the association is.

Why a chi-square test

When both variables are categories rather than numbers, this is the test that tells you whether they are related.

Any table size

2×2, 3×4, or larger. Degrees of freedom are computed from the shape you paste.

Effect size included

Cramer's V sits next to the p-value, because a big table with a big sample can be significant and still trivial.

Warns on low expected counts

If any expected cell drops below 5 the result flags it, since the chi-square approximation gets shaky there.

What it answers

Survey cross-tabs

Does answer choice depend on region, plan, or age group?

Multi-variant tests

Compare conversion counts across three or more variants in one test.

Preference and category data

Any question where both the row and the column are labels rather than measurements.

The formula

χ² = Σ (O − E)² ÷ E where E = (row total × column total) ÷ grand total · df = (rows − 1)(columns − 1)

O is the observed count in a cell and E is the count you would expect if the two variables were independent. Cramer's V rescales χ² to a 0 to 1 effect size using the sample size and the smaller table dimension.

Assumptions to check

  • Cells must hold counts of independent observations, not percentages or repeated measures on the same people.
  • Each observation belongs in exactly one cell.
  • Expected counts should be at least 5 in most cells. Fisher's exact test is the alternative for tiny tables.
  • A significant result says the variables are associated, not which direction or which cell caused it.

Related calculators

Frequently asked questions

How do you calculate a chi-square statistic?

For each cell, compute the expected count as (row total × column total) ÷ grand total. Then sum (observed − expected)² ÷ expected across every cell.

Degrees of freedom are (rows − 1) × (columns − 1), and the p-value comes from the chi-square distribution with that df.

What is a contingency table?

A grid of counts crossing two categorical variables. Rows might be “used the coupon” and “did not”, while columns are “new customer” and “returning”.

Each cell holds how many people fall into that combination. Enter one row per line here, comma separated.

What does a significant chi-square result mean?

That the row and column variables are unlikely to be independent. Knowing one tells you something about the other.

It does not tell you which cells drove the result. Compare observed against expected counts cell by cell to find that.

What is Cramer's V?

An effect size from 0 to 1 derived from chi-square. Roughly, 0.1 is a weak association, 0.3 moderate, and 0.5 or above strong.

It matters because with a large enough sample almost any table becomes statistically significant while the association stays practically meaningless.

Why does it warn about expected counts below 5?

The chi-square distribution is an approximation that degrades when expected cell counts are very small. The usual guidance is that most expected counts should be 5 or more.

With a small 2×2 table, Fisher's exact test is the better choice.

Can I enter percentages?

No. The test relies on actual counts to estimate variability. Entering percentages will produce a number, but it will not be a valid test. Convert back to raw counts first.

Chi-square or a two-proportion test?

For exactly two groups and one yes/no outcome they agree, and the statistical significance calculator also gives you the lift.

Use chi-square when you have more than two groups or more than two outcome categories.

Is my table stored?

No. Parsing and testing happen in your browser.

Collecting fresh survey responses? Try Formms for a form with a short link and QR.

Collect the responses on your phone next.

Formms builds the survey from a prompt, then you can paste counts back into these calculators anytime.

Create a free form My forms
Download on iOS
Scan to download iOS app
Download on Android
Scan to download Android app
View a demo form →