Chi-square calculator

A chi-square test compares counts with what you would expect by chance. Use goodness of fit for one list of counts, or independence for a table of two categories.

Your answer

Chi-square statistic16.6667
p-value0.00004
Degrees of freedom1
Cramér's V (effect size)0.408
Smallest expected count20
  • Significant at 5%: the counts differ from what chance would explain.

Worked out in your browser. Nothing you type is sent to a server.

Step-by-step solution

Updated as you change the numbers.

  1. For each cell, work out (observed − expected)² ÷ expected, and add them up.
  2. χ² = 16.6667 with 1 degrees of freedom gives p = 0.00004.

Method and assumptions

Pearson's chi-square test, without continuity correction. For a table, expected counts are row total × column total ÷ grand total. Expected counts in a goodness-of-fit test are scaled to the observed total.

Questions

How many degrees of freedom does a table have?

(rows − 1) × (columns − 1). A 2 by 2 table has one.

Sources

Method and figures checked on October 31, 2026. Every worked answer on this page is covered by an automated test. Found a mistake? Tell us.

Embed this calculator on your site

Free to use. Paste this where you want the calculator; it runs in your visitors’ browsers, sets no cookies and never sends us anything your visitors type.

Related calculators