2×2 Contingency Table Calculator
Chi-square, Fisher's exact test, odds ratio, relative risk and attributable risk.
Enter your values to see the result.
Fisher's exact test is preferred when any expected count is below 5. The chi-square test is shown with and without Yates' continuity correction. Results use standard large-sample formulas and are meant to support, not replace, a statistician's review. Check the assumptions behind each method before you report the numbers.
Continue your work
- Odds Ratio Calculator — Focus on the odds ratio and its interval.
- P-value Calculator — Convert any chi-square value to a p-value.
Share this tool
Found it useful? Send it to a friend or teammate.
Rate this tool
0.0
0 ratings
- 5 stars 0
- 4 stars 0
- 3 stars 0
- 2 stars 0
- 1 star 0
Clear instructions
Find steps, examples and limitations below.
Use online
Open the tool in a supported web browser.
Free to use
No sign-up required. Tool-specific limits may apply.
How to use the 2×2 Contingency Table Calculator
Chi-square, Fisher's exact test, odds ratio, relative risk and attributable risk.
- 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.
Example and practical tips
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.
Frequently asked questions
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.
Report an issue
Something broken or not quite right? Tell us and we will look into it.