Fisher's Exact Test Calculator

Calculate exact p-values for 2×2 contingency tables

Open Calculator

What is Fisher's Exact Test?

Fisher's exact test is a statistical significance test for 2×2 contingency tables. Unlike the chi-square test, it calculates the exact probability of observing the data, making it ideal for small sample sizes where chi-square approximations may be unreliable.

When to Use Fisher's Exact Test

See the assumptions guide for a decision flowchart on choosing the right test.

Fisher's Test vs Chi-Square

Fisher's ExactChi-Square
Exact p-valueApproximate p-value
Any sample sizeLarge samples preferred
2×2 tables onlyAny table size
Computationally intensiveFast calculation

Example: Drug Trial

A small pilot study tests a new treatment:

ImprovedNo Change
Treatment82
Placebo37

With only 20 patients, Fisher's exact test gives p = 0.035, indicating a significant effect.

How Fisher's Exact Test Works

The test calculates the probability of obtaining the observed distribution (and more extreme ones) by considering all possible arrangements of the data while keeping row and column totals fixed. For the full mathematical derivation including the hypergeometric formula, see the Fisher's Exact Test documentation.

Interpreting Results

Two-tailed test: Tests for any association (most common)

One-tailed test: Tests for association in a specific direction

Try Fisher's Exact Test

CrossTabs.com automatically calculates Fisher's exact p-value for all 2×2 tables:

Calculate Now

Step-by-Step Example

A clinical trial tests whether a rare adverse event differs between drug and placebo groups. With only 20 patients:

Adverse EventNo EventTotal
Drug4610
Placebo1910
Total51520

Why not chi-square? Expected count for Drug + Adverse Event = (10 × 5)/20 = 2.5, which is below 5. Chi-square approximation is unreliable here.

Fisher's exact test calculates the exact probability using the hypergeometric distribution: p = C(5,4)×C(15,6) / C(20,10) and sums all tables as extreme or more extreme.

Result: Two-sided p = 0.303. The adverse event rate does not significantly differ between groups.

Common Mistakes to Avoid

Fisher's Exact vs. Chi-Square: Quick Decision Guide

CriterionUse Fisher's ExactUse Chi-Square
Any expected count < 5✓ Required✗ Unreliable
Total N < 20✓ Recommended✗ Unreliable
Large sample (N > 100)✓ Valid but slow✓ Preferred (faster)
Tables larger than 2×2✓ Valid (computationally intensive)✓ Preferred
Need exact p-value✓ Always exact✗ Approximation only

Frequently Asked Questions

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

Use Fisher's exact test when any expected cell count is less than 5, or when the total sample size is less than 20. Fisher's exact test calculates the exact probability rather than relying on the chi-square approximation, making it more reliable for small samples.

Can Fisher's exact test be used for tables larger than 2×2?

Yes, Fisher's exact test can be extended to tables larger than 2×2 (called the Freeman-Halton test), but it becomes computationally intensive. For large tables with adequate expected frequencies, chi-square is generally preferred.