Fisher's Exact Test Calculator

Enter counts for a 2×2 table to compute one-tailed and two-tailed exact p-values based on the hypergeometric distribution.

Row sums: [17, 12]

Column sums: [15, 14]

Observed table probability: 1.7553e-2

Left-tailed p-value: 0.997868

Right-tailed p-value: 0.019685

Two-tailed p-value: 0.025328

How to Use This Calculator

  1. Enter non-negative integer counts for the 2×2 contingency table.
  2. Verify that row and column totals reflect your study design.
  3. Review one-tailed and two-tailed p-values to assess association.
  4. Apply appropriate significance thresholds or confidence intervals for interpretation.

Formula

Hypergeometric probability for observed table:

P = [ (a + b)! (c + d)! (a + c)! (b + d)! ] / [ a! b! c! d! N! ], where N = a + b + c + d

Two-tailed p-value sums probabilities of tables with probability ≤ observed probability under fixed margins.

Full Description

Fisher's exact test evaluates association between two categorical variables in a 2×2 table, using the hypergeometric distribution to compute exact probabilities given fixed margins. It is appropriate for small sample sizes or sparse data where chi-square approximations may fail.

Frequently Asked Questions

Why are there two-tailed and one-tailed results?

One-tailed p-values test for directional association (positive or negative). Two-tailed p-values consider deviations in both directions.

Is the two-tailed method exact?

This implementation sums probabilities ≤ observed probability, a common conservative approach for two-tailed Fisher tests.

What if counts are very large?

Exact enumeration may become computationally intensive. For large counts, chi-square approximations or Monte Carlo methods are often used.

Can I analyze tables larger than 2×2?

Fisher's exact test generalizes, but computations become complex. This calculator focuses on 2×2 tables.