Fisher's Exact Test Calculator
Compute one-tailed and two-tailed p-values and odds ratio for a 2x2 contingency table using Fisher's exact test.
What Is Fisher's Exact Test?
Fisher's exact test checks independence between two categorical variables in a 2×2 contingency table. It is preferred over the chi-square test when sample sizes are small or expected cell counts fall below five. Try the Chi-Square Test Calculator for larger tables.
Hypergeometric Probability Formula
Under the null hypothesis of independence, the probability of observing cell counts $a$, $b$, $c$, $d$ is:
$$P = \frac{(a+b)!\,(c+d)!\,(a+c)!\,(b+d)!}{a!\,b!\,c!\,d!\,n!}$$
where $n = a + b + c + d$. The p-value sums probabilities of tables as extreme as (or more extreme than) the observed table.
When to Use Fisher's Exact Test
Use Fisher's exact test for 2×2 tables with small totals, uneven marginals, or any cell count below five. For larger balanced tables, the chi-square approximation is usually sufficient and faster to compute.
Frequently Asked Questions
What is the odds ratio in a 2×2 table?
The odds ratio is $(a \times d) / (b \times c)$. It measures how much the odds of the outcome change between the two groups. A value of 1 indicates no association.
Should I use one-tailed or two-tailed Fisher's test?
Two-tailed is the default unless you have a strong prior reason to test association in only one direction. Two-tailed sums probabilities of all tables with probability less than or equal to the observed table.
How is Fisher's exact test different from chi-square?
Chi-square uses an asymptotic approximation that can be inaccurate with small samples. Fisher's test computes exact probabilities from the hypergeometric distribution, making it reliable for small tables.
What does a small p-value mean?
A small p-value (typically below 0.05) suggests the two variables are not independent. The association between rows and columns is unlikely to have occurred by chance alone.
Related Tools
Recent Visits
Finance Calc Kit
Focused calculators on Finance Calc Kit for loans, compounding investments, contractor tax estimates, and reti...
Explore Finance Calc Kit