Home · Statistics · Inference & Tests · Fisher's Exact Test Calculator
Fisher's Exact Test Calculator
Fisher's exact test for a 2×2 table: the exact two-sided p-value for association between two binary variables, valid even with very small counts.
What this calculator does
Fisher's exact test for a 2×2 table: the exact two-sided p-value for association between two binary variables, valid even with very small counts. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.
The formula and method
The table is read as rows (a, b) and (c, d). With both margins fixed, cell a follows a hypergeometric distribution under independence.
The two-sided p-value adds up the probabilities of every table with these margins whose probability is at most the observed table's.
Unlike the chi-square test, the calculation is exact — no large-sample approximation — so it is the standard choice when any expected count is small.
Worked example
With the example inputs this page opens with (cell a (row 1, column 1) 8, cell b (row 1, column 2) 2, cell c (row 2, column 1) 3, cell d (row 2, column 2) 7), the result is 0.0698. Change any figure and the result updates with the same formula.
Quick reference
| Cell a (row 1, column 1) | Result |
|---|---|
| 4 | 0.3024 |
| 8 | 0.0698 |
| 10 | 0.0274 |
| 12 | 0.0104 |
| 16 | 0.0028 |
| 9 | 0.0300 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
When should I use Fisher's exact test instead of chi-square?
When the sample is small — the usual trigger is any expected cell count below about 5, where the chi-square approximation breaks down. Fisher's test stays exact at any size, though it grows computationally heavy for large tables.
Why is the p-value 0.070 when the table looks lopsided?
With only 20 observations, tables this uneven arise by chance fairly often under independence. Exact tests on small counts are conservative; the same proportions in a table ten times larger would be strongly significant.
How does the Fisher's Exact Test Calculator work?
Fisher's exact test for a 2×2 table: the exact two-sided p-value for association between two binary variables, valid even with very small counts. Cell a · Cell b · Cell c · Cell d → Two-sided p-value. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Fisher's Exact Test Calculator need?
Cell a · Cell b · Cell c · Cell d → Two-sided p-value. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.