Fisher’s Exact Test Calculator
Enter a 2×2 table to run Fisher’s exact test — the correct choice when expected counts are small and the chi-square approximation can’t be trusted. You get the exact two-sided p-value and the odds ratio, matching R’s fisher.test().
How to use it
When to use Fisher’s exact test
Both Fisher’s exact test and the chi-square test check whether two categorical variables in a 2×2 table are associated. The difference is small samples:
- Chi-square relies on a large-sample approximation, which breaks down when expected cell counts are small (a common rule: any expected count below 5).
- Fisher’s exact test computes the probability directly from the hypergeometric distribution — no approximation — so it’s valid for any sample size and is the standard choice for small tables.
The odds ratio summarises the strength of association: 1 means no association, above 1 means the outcome is more likely in row 1. This calculator reports the simple sample odds ratio (ad/bc); R’s conditional maximum-likelihood estimate can differ slightly.
Do it in R
tab <- matrix(c(8, 2, 1, 9), nrow = 2, byrow = TRUE)
fisher.test(tab)FAQ
Frequently asked questions
Fisher’s exact test or chi-square?
Use Fisher’s exact test for small samples (small expected counts); use chi-square for larger tables where the approximation is reliable. When in doubt on a 2×2 table, Fisher’s is always defensible.
Why is my odds ratio slightly different from R?
This tool reports the plain sample odds ratio (ad/bc). R’s fisher.test() reports a conditional maximum-likelihood estimate, which differs a little — but the p-value matches.
Categorical data with more than one 2×2 table? We handle the full analysis.