Fisher's exact test calculator

Exact test of association for a 2 × 2 table. The right choice when counts are too small for chi-square.

Enter counts (whole numbers). Labels are optional.
p = .486two-sided
No significant association at α = .05.
One-sided (OR < 1)
p = .986
One-sided (OR > 1)
p = .243
Sample odds ratio
9
N
8
Smallest expected count
2

Fisher's exact test, p = .486, OR = 9, N = 8

How the exact p-value is found

Holding the row and column totals fixed, the count in the top-left cell follows a hypergeometric distribution. The calculator lists every possible table with those margins, computes each one's probability, and adds up those no more likely than yours. The classic example is R. A. Fisher's “lady tasting tea” (1935): 3 of 4 cups identified correctly gives p = .486, far from convincing.

Chi-square or Fisher?

If every expected count is 5 or more, the chi-square test and Fisher's test agree closely and either is fine. Below that, report Fisher's. For tables larger than 2 × 2 with sparse cells, combine categories or use an exact or Monte Carlo test in statistical software.

Frequently asked questions

When should I use Fisher's exact test instead of chi-square?

For a 2 × 2 table when sample sizes are small, typically when any expected count is below 5. Fisher’s test computes the exact probability of the table given the margins, so it does not rely on a large-sample approximation.

How is the two-sided p-value calculated?

It sums the probabilities of every table with the same row and column totals that is as likely as or less likely than the observed one. This is the method used by R’s fisher.test and most statistical packages.

What does the odds ratio mean here?

The sample odds ratio (a·d)/(b·c) compares the odds of the outcome in row 1 with row 2. An OR of 1 means no association. R reports a conditional maximum-likelihood estimate, which differs slightly for small tables.

Is Fisher’s test too conservative?

With fixed margins and discrete data, its actual type I error rate is usually below α. Some statisticians prefer the mid-p variant or Barnard’s test for that reason; Fisher’s remains the most widely reported.