Fisher’s Exact Test Calculator (2×2)

Test a 2 x 2 table of counts exactly, including small samples.

What Fisher’s exact test does

Fisher’s exact test checks whether two categorical variables are associated in a 2 × 2 table. It is the standard choice when the sample is small, because the chi-square test is unreliable when some expected counts fall below 5. Instead of an approximation, Fisher’s test calculates the exact probability of the table, and of tables that are more extreme, given the row and column totals.

Worked example

A small study has 8 successes and 2 failures with treatment, and 1 success and 5 failures with a control. The counts are a = 8, b = 2, c = 1, d = 5. The success rate is 80% with treatment and 17% with the control. Fisher’s exact test gives a two-tailed p-value of 0.0350, and the sample odds ratio is 20. The chi-square test on the same table would give p = 0.0134, but with expected counts below 5 it should not be trusted.

The table for the example
Success Failure Row total
Treatment 8 2 10
Control 1 5 6
Column total 9 7 16

How it is calculated

  • With the row and column totals fixed, the number in the top-left cell follows a hypergeometric distribution.
  • The two-tailed p-value adds up the probabilities of every table that is as likely as, or less likely than, the one you observed.
  • The odds ratio is (a × d) ÷ (b × c). A value of 1 means no association. The calculator also gives an approximate 95% confidence interval from the Woolf method.
  • The one-tailed options test whether the top-left cell is larger or smaller than expected.

For larger tables or large counts, use the chi-square test of independence.

How to cite this page

CalcPulse. (2026). Fisher’s Exact Test Calculator. https://calcpulse.com/fishers-exact-test-calculator/

Frequently asked questions

What is Fisher's exact test?

A test of association between two categorical variables in a 2 × 2 table, using exact probabilities instead of a chi-square approximation.

When should I use it instead of chi-square?

When the sample is small, especially if any expected count is below 5.

What is the odds ratio?

The odds of the outcome in the first row divided by the odds in the second, (a × d) ÷ (b × c). A value of 1 means no association.

Is Fisher's exact test one-tailed or two-tailed?

Both are available. The two-tailed test is the default and the usual choice.

Can it be used for tables larger than 2 × 2?

This calculator is for 2 × 2 tables. Larger tables need the Freeman-Halton extension, or the chi-square test with enough data.

Last updated