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
- Enter the four cell counts for exposed and unexposed groups.
- Choose the confidence level for the effect measures.
- 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.
Explore Research & Academic Tools · More practical guides