Fisher's Exact Test Calculator
The exact p-value for a 2×2 table — no approximation, valid at any sample size, and the correct choice when counts are small.
With the row and column totals fixed, the number of ways to fill the table follows the hypergeometric distribution exactly.
How the fisher's exact test calculator works
With the row and column totals fixed, the number of ways to fill the table follows the hypergeometric distribution exactly. Fisher's test sums the probability of the observed table and every table at least as extreme.
Because it is exact rather than asymptotic, it is valid however small the counts are — which is why it is the standard for tables where chi-square's expected-count rule fails.
Formula: P = C(a+b, a) C(c+d, c) / C(n, a+c)
Worked examples
| Inputs | Two-tailed p-value | Note |
|---|---|---|
| 8/2 against 3/7 | 0.06977852 | p = 0.070 — not quite significant |
| The lady tasting tea | 0.02857143 | Fisher's original 1935 experiment: p = 0.029 |
| No association | 1 | p = 1 |
FAQFrequently asked questions
When should I use Fisher's exact test?
Any 2×2 table where an expected count falls below 5 — and, since it is exact, you can use it at any size.
Why is it called exact?
Because it computes the p-value from the exact hypergeometric distribution rather than approximating it with a chi-square curve.
What was the lady tasting tea?
Fisher's 1935 example: a colleague claimed she could tell whether milk went into the cup before or after the tea. Eight cups, four each way, all correct — p = 0.029 one-tailed.
Why do one- and two-tailed p-values differ so much?
Because the hypergeometric distribution is usually asymmetric, so the opposite tail rarely mirrors the observed one.
Is it conservative?
Yes, somewhat — conditioning on the margins makes it slightly less powerful than an unconditional exact test. It is nonetheless the standard.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Australian Curriculum (ACARA) — Mathematics — the terms and methods taught in Australian schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.