fisher exact test calculator

Fisher Exact Test Calculator (2×2 Contingency Table)

Enter non-negative integer counts for a 2×2 table. This tool reports left-tailed, right-tailed, and two-tailed Fisher exact p-values, plus odds ratio estimates.

Outcome 1 Outcome 2
Group 1
Group 2

Model: fixed margins hypergeometric exact test. Two-tailed p-value uses the common “sum of tables with probability ≤ observed table probability” approach.

What Is Fisher’s Exact Test?

Fisher’s exact test is used to evaluate association between two categorical variables in a 2×2 contingency table. It is especially useful when sample sizes are small or expected cell counts are low. Unlike large-sample approximations (like chi-square tests), Fisher’s method computes an exact p-value from the hypergeometric distribution.

When to Use This Fisher Exact Test Calculator

  • You have a 2×2 contingency table (for example, treatment vs control and success vs failure).
  • Some counts are small (often expected count < 5 in one or more cells).
  • You want an exact p-value rather than an approximation.
  • You need one-tailed or two-tailed Fisher exact test results for publication or reporting.

How to Read the Inputs

Your table is arranged as:

  • a: Group 1 with Outcome 1
  • b: Group 1 with Outcome 2
  • c: Group 2 with Outcome 1
  • d: Group 2 with Outcome 2

All four values must be non-negative integers. The calculator then derives row totals, column totals, and computes exact probabilities for all feasible tables with those fixed margins.

Output Explained

Right-Tailed p-value

This tests for enrichment in the top-left cell (larger a than expected under independence, given fixed margins). It is often used when your directional hypothesis is “Group 1 has more Outcome 1 than Group 2.”

Left-Tailed p-value

This tests for depletion in the top-left cell (smaller a than expected).

Two-Tailed p-value

This is the non-directional exact significance level. In this calculator, it is computed by summing probabilities of all feasible tables with probability less than or equal to the observed table probability.

Odds Ratio

The odds ratio (OR) summarizes effect size:

  • OR > 1 suggests positive association.
  • OR < 1 suggests negative association.
  • OR = 1 suggests no association.

When zeros appear, the raw OR can be 0, infinite, or undefined. To help interpretation, the calculator also reports a continuity-corrected OR using +0.5 in each cell.

Practical Notes

  • Fisher’s exact test is exact for fixed margins and does not rely on asymptotic assumptions.
  • Two-tailed definitions vary slightly across software packages. Small numeric differences can happen.
  • Statistical significance does not guarantee practical significance; always consider effect size and context.

Example Use Case

Suppose you compare response rates between a new intervention and a control group. If sample size is limited and one cell has a very small count, Fisher’s exact test is often preferred over Pearson’s chi-square test.

FAQ

Is this a chi-square calculator?

No. This page is an exact test calculator for 2×2 tables.

Can I use decimals?

No. Contingency table cell counts must be whole numbers.

Can I use this for tables larger than 2×2?

This version is specifically for 2×2 Fisher exact test calculations.

🔗 Related Calculators