StatGardenREF. DESK
Calculators/Statistics/Fisher's exact test
Statistics

Fisher's exact test calculator

Runs a two-tailed Fisher exact test on a 2×2 contingency table of counts.

What this calculator does

Fisher's exact test works out runs a two-tailed Fisher exact test on a 2×2 contingency table of counts. Enter your own figures above and the answer updates as you type: nothing is fixed in the code, so the result reflects exactly the numbers you supply.

The formula this calculator evaluates is printed under the tool and explained below, so you can check the working by hand or reuse it in a spreadsheet.

The formula

FormulaP(table) = (a+b)!(c+d)!(a+c)!(b+d)! / (a!b!c!d!n!). Two-tailed p-value sums P over all tables (same margins) with P ≤ P(observed)

The inputs explained

FieldWhat to enter
Group 1, outcome AA number. Starts at 8.
Group 1, outcome BA number. Starts at 2.
Group 2, outcome AA number. Starts at 1.
Group 2, outcome BA number. Starts at 9.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the answer changes with group 1, outcome a

Every other input is held at the calculator’s starting values while group 1, outcome a varies. Select any row to load that scenario into the calculator.

How the answer changes with group 1, outcome a
Group 1, outcome ATwo-tailed p-valueProbability of observed tableOdds ratio (a·d)/(b·c)
40.0357140.03434118.000
60.0128210.00879827.000
80.0054770.00267936.000
120.0005160.00036554.000
160.000072090.0000712572.000
240.000005450.00000541108.000