2×2 Chi-Square Independence Test Calculator — Free Online | EverydayCalcSkip to main content
everydaycalc.

Find calculators and file viewers

Press Esc to close · / or Ctrl+K to open

Home›Math & Scientific›2×2 Chi-Square Independence Test Calculator
Math & Scientific

2×2 Chi-Square Independence Test Calculator

Test independence in a 2-by-2 contingency table with Pearson chi-square, 1 degree of freedom, expected-count warning and p-value.

✦ INSTANT CALCULATION

2×2 Chi-Square Independence Test Calculator

YOUR RESULT
—

ⓘ Calculated locally in your browser. Results depend on the values and units you enter.

Interactive mathematical graph

The axes, points and dimensions are recalculated from the values you enter.

What changes if one input changes?

27: 0.00640108146222187 p-value · 30: 0.00256897008144286 p-value · 33: 0.00103580306832168 p-value

How this calculator works

Enter four nonnegative whole-number counts for a 2×2 cross-tabulation. Pearson’s uncorrected chi-square statistic is N(ad−bc)² / (row1×row2×column1×column2), with df=1. The p-value comes from the chi-square(1) right tail. Both rows and columns must contain observations. Small expected counts, typically less than 5, make the asymptotic approximation questionable; use a suitable exact test such as Fisher’s in that case. These are counts of independent observations, not percentages, proportions or repeated measurements.

Worked example

Counts 30,20 in row 1 and 15,35 in row 2 give chi-square ≈ 9.0909 and two-sided independence-test p ≈ 0.00257.

Engine-checked example

This example uses the values shown below, not your current entries.

Row 1 / Column 1 count
30
Row 1 / Column 2 count
20
Row 2 / Column 1 count
15
Row 2 / Column 2 count
35
Result for the sample inputs0.00256897008144286 p-value

Frequently asked questions

Does this include Yates correction?

No. The Pearson chi-square statistic is calculated without continuity correction.

Can I use sparse tables?

You can view the expected-count diagnostic, but for low expected counts a Fisher exact test may be more appropriate.

Results are informational and assume the stated inputs and formulas. Double-check critical financial or engineering decisions with a qualified professional.

Add this calculator to your website

Share a working calculator on your blog or website. Choose a fixed size or let the height fit the content.

Fixed height

Works on websites that accept iframe HTML.

Responsive height

Automatically adjusts the height. Your website must allow scripts.

Open calculator preview ↗

Powered by EverydayCalc