Advanced

Fisher's Exact Test Calculator

Fisher's exact test gives the exact probability of observing a 2×2 contingency table as extreme as or more extreme than the one you have, under the null hypothesis of independence — without relying on the chi-square approximation. Enter the four cell counts and get an exact two-tailed p-value, odds ratio and 95% confidence interval.
e.g. exposed + outcome
e.g. exposed + no outcome
e.g. unexposed + outcome
e.g. unexposed + no outcome
Two-tailed p-value
0.004635

Statistically significant at α = 0.05

p-value
0.004635
Sample size (N)
100
Odds ratio
3.5
95% CI (OR)
1.529 – 8.012
Relative risk
2
α=0.05Standard normal — shaded region shows p < 0.05 tail
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Fisher's exact test computes P by summing hypergeometric probabilities of all 2×2 tables with the same marginals that are at least as extreme as observed. No large-sample approximation is needed. Enter the four cell counts A, B, C, D to get an exact two-tailed p-value, odds ratio (A×D)/(B×C) and its 95% CI.

Formula
P = C(a+b,a)·C(c+d,c) / C(n, a+c) summed over all tables as or more extreme
How this is calculated

A 2×2 contingency table has cells A (row 1, col 1), B (row 1, col 2), C (row 2, col 1) and D (row 2, col 2). Fisher's test fixes the row and column marginals and enumerates every possible arrangement of counts consistent with those margins. For each arrangement it computes the hypergeometric probability P = [C(a+b, a) × C(c+d, c)] / C(n, a+c), where C is the binomial coefficient. The two-tailed p-value is the sum of probabilities of all arrangements that are at most as likely as the observed one — this is exact even for tiny samples.

The odds ratio OR = (A×D) / (B×C) quantifies the strength of association; OR > 1 means the outcome is more common in row 1. The 95% confidence interval is computed via the Woolf log-transformation (requires all four cells to be non-zero). Relative risk = (A/(A+B)) / (C/(C+D)) compares proportions directly.

Fisher's test has no minimum cell-count requirement and is preferred over chi-square whenever any expected cell count falls below 5. The assumption is that observations are independent and the marginals are fixed (design-based sampling). For larger tables use the chi-square test of independence.

Frequently asked questions

Use Fisher's exact test when you have a 2×2 table with small expected cell counts (any expected count below 5), small total sample sizes, or when you need an exact rather than approximate p-value. For larger contingency tables the chi-square approximation is usually adequate.

The odds ratio compares the odds of the outcome in the two groups. An OR of 1 means no association; OR > 1 means the outcome is more likely in row 1; OR < 1 means it is less likely. The 95% CI shows the range of plausible values — if it excludes 1 the association is statistically significant.

The Woolf log-CI method requires all four cells to be non-zero. If any cell is 0 the odds ratio is either 0 or infinite, and its confidence interval is undefined. Add a small correction (e.g. 0.5 to each cell) if you need an estimate, but treat it cautiously.

APA

TG we-Calculate Editorial Team. (2026). Fisher's Exact Test Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/fishers-exact-test-calculator

Chicago

TG we-Calculate Editorial Team. "Fisher's Exact Test Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/fishers-exact-test-calculator.

IEEE

TG we-Calculate Editorial Team, "Fisher's Exact Test Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/fishers-exact-test-calculator

BibTeX

@misc{wecalculate_fishers_exact_test_calculator, title = {Fisher's Exact Test Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/fishers-exact-test-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?