Skip to content

How to Use 2×2 Contingency Table Calculator

Analyse a 2×2 table with Pearson and Yates chi-square, Fisher’s exact test, odds ratio, relative risk, risk difference and expected counts.

About this tool

Chi-square, Fisher's exact test, odds ratio, relative risk and attributable risk.

How to use 2×2 Contingency Table Calculator

  1. Enter the four cell counts for exposed and unexposed groups.
  2. Choose the confidence level for the effect measures.
  3. Read the test results; Fisher’s exact test is used when expected counts are small.

Worked example

12 of 50 exposed and 4 of 50 unexposed people have the outcome: χ² = 4.76, p = 0.029, and the odds ratio is 3.63.

When should I use Fisher’s exact test?

When any expected count is below 5. The chi-square approximation is unreliable with small expected counts.

What does Yates’ correction do?

It makes the chi-square test more conservative for 2×2 tables. It is often too conservative, so both versions are shown.

Put this guide into practice

Explore Research & Academic Tools · More practical guides

Accessibility Menu

Personalize your experience. Open with Ctrl+U (Option+U on Mac). Preferences stay in this browser when storage is available.

Move / Hide Widget

Restore at any time with Ctrl+U (Option+U on Mac).

Accessibility statement and help