Free Tools › Fisher's Exact Test Calculator
Test for an association in a 2×2 table when the sample is small. Get exact two-sided and one-sided p-values and the sample odds ratio.
FreeNo account neededYour data stays in your browser
| Outcome yes | Outcome no | |
|---|---|---|
| Group 1 | ||
| Group 2 |
| p-value (two-sided) | 0.035 |
|---|---|
| p-value (one-sided, group 1 lower) | 0.999 |
| p-value (one-sided, group 1 higher) | 0.024 |
| Sample odds ratio | 20.000 |
Type the counts of outcome yes and outcome no for group 1 and group 2.
See the two-sided p-value and both one-sided p-values (group 1 lower and group 1 higher).
The sample odds ratio shows the direction and size of the association.
Click Copy result, then report the counts in each group, the two-sided p-value and an effect estimate such as the odds ratio.
Fisher's exact test calculates the exact probability of the observed table, given its row and column totals, instead of relying on the chi-square approximation.
It is the usual choice when expected counts are small, typically when any expected count is below 5 in a 2×2 table.
The chi-square test relies on an approximation that is only trustworthy when no more than 20% of cells have expected counts below 5 and no cell is below 1. In a 2×2 table, a single small cell already breaks that rule. Fisher's exact test has no such requirement: it is valid at any sample size.
Worked example: in a small pilot, 1 of 10 treated participants and 7 of 10 controls had the outcome. The expected count is 4 in both outcome cells, so chi-square is unreliable. Fisher's exact test gives a two-sided p = 0.020 and a sample odds ratio of 0.05. A chi-square test on the same table gives p = 0.006, overstating the evidence because the approximation breaks down with counts this small.
When you report the result, give the counts as well as the p-value, for example: the outcome occurred in 1/10 treated and 7/10 control participants (Fisher's exact test, two-sided p = 0.020). Add an effect estimate such as the odds ratio or risk difference with its confidence interval, because a p-value alone does not show how large the difference is.
Use Fisher's exact test when expected counts are small; with large samples the two give very similar answers.
No. It is valid at any sample size. It matters most with small samples, because that is when the chi-square approximation fails; with large samples the two tests agree closely.
Use the two-sided p-value unless you stated the direction of the effect before seeing the data. Most journals expect two-sided tests.
The Fisher-Freeman-Halton extension handles larger tables, but this calculator covers 2×2 tables only. Statistical software such as R (fisher.test) runs the larger version.