Roboculator
Online CalculatorsCategoriesDate & EventsNews
Get Started
Online CalculatorsCategoriesDate & EventsNewsGet Started
Roboculator

Smart calculators for every challenge. Free, fast, and private.

Categories

  • Finance
  • Health
  • Math
  • Construction
  • Conversion
  • Everyday Life

Popular Tools

  • Date & Events
  • Loan Calculator
  • BMI Calculator
  • Percentage Calc
  • Latest News
  • Search All

Resources

  • Glossary
  • Topic Tags
  • News & Insights

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy
  • Disclaimer
© 2026 Roboculator. All rights reserved.
Roboculator

roboculator.com

  1. Home
  2. /Statistics
  3. /Statistical Inference & Hypothesis Testing
  4. /Fisher's Exact Test Calculator

Fisher's Exact Test Calculator

Calculator

Results

Odds Ratio

36

Log Odds Ratio

3.583519

Risk Ratio

8

Risk Difference

0.7

Row 1 Total

10

Row 2 Total

10

Column 1 Total

9

Column 2 Total

11

Grand Total

20

Row 1 Event Rate

0.8

Row 2 Event Rate

0.1

Expected Count A

4.5

Expected Count B

5.5

Expected Count C

4.5

Expected Count D

5.5

Results

Odds Ratio

36

Log Odds Ratio

3.583519

Risk Ratio

8

Risk Difference

0.7

Row 1 Total

10

Row 2 Total

10

Column 1 Total

9

Column 2 Total

11

Grand Total

20

Row 1 Event Rate

0.8

Row 2 Event Rate

0.1

Expected Count A

4.5

Expected Count B

5.5

Expected Count C

4.5

Expected Count D

5.5

The Fisher's Exact Test Calculator analyzes association in 2×2 contingency tables, especially valuable when sample sizes are small. Unlike the chi-square test which uses an approximation, Fisher's test computes exact probabilities based on the hypergeometric distribution, making it the gold standard for small-sample categorical data analysis.

This calculator provides the odds ratio, risk ratio, log odds ratio, and table marginals. For tables with small cell counts where chi-square is unreliable, Fisher's exact test gives precise results.

Visual Analysis

How It Works

Fisher's exact test is based on the hypergeometric distribution. Given fixed row and column marginals, the probability of observing a specific table configuration is:

$$P = \frac{\binom{a+b}{a} \binom{c+d}{c}}{\binom{n}{a+c}} = \frac{(a+b)!(c+d)!(a+c)!(b+d)!}{n! \cdot a! \cdot b! \cdot c! \cdot d!}$$

The p-value is computed by summing probabilities of all tables as extreme or more extreme than the observed table, while keeping marginals fixed. The odds ratio provides a measure of effect size:

$$OR = \frac{a \cdot d}{b \cdot c}$$

The odds ratio compares the odds of the outcome in one group versus the other. OR = 1 indicates no association, OR > 1 indicates higher odds in the first group, and OR < 1 indicates lower odds. The risk ratio (relative risk) is \(RR = (a/(a+b)) / (c/(c+d))\), comparing proportions directly.

The log odds ratio \(\ln(OR)\) is useful because its sampling distribution is approximately normal for moderate sample sizes, facilitating confidence interval construction: \(\ln(OR) \pm z_{\alpha/2} \sqrt{1/a + 1/b + 1/c + 1/d}\).

Understanding Your Results

Interpreting the results from Fisher's exact test:

  • Odds Ratio (OR): OR = 1 means no association. OR > 1 suggests the outcome is more likely in Row 1 relative to Row 2. OR < 1 suggests the opposite. The magnitude indicates strength of association.
  • Risk Ratio (RR): Directly interpretable as the ratio of probabilities. RR = 2 means the event is twice as likely in group 1. RR is preferred in prospective studies; OR is used in case-control studies.
  • Marginals: Row and column totals provide context for the cell frequencies and indicate the constraint structure of the test.
  • When to use: Fisher's test is especially important when any expected cell frequency would be less than 5, making the chi-square approximation unreliable.

Worked Examples

Small Clinical Trial

Inputs

a8
b2
c1
d9

Results

odds ratio36
risk ratio4
n total20
log odds3.5835

Treatment vs control with small samples. OR = 36.0 indicates very strong association between treatment and positive outcome. 80% success in treatment vs 10% in control.

Rare Disease Exposure Study

Inputs

a5
b3
c2
d10

Results

odds ratio8.3333
risk ratio3.125
n total20
log odds2.1203

Case-control study of rare exposure. OR = 8.33 suggests exposed individuals have substantially higher odds of disease.

Frequently Asked Questions

Use Fisher's exact test when: (1) Any expected cell frequency is less than 5, (2) Total sample size is less than 20-30, (3) The data are very unbalanced (one cell count near zero), or (4) You want exact (not approximate) p-values regardless of sample size. Many statisticians recommend Fisher's test as the default for all 2×2 tables.

An odds ratio of 0 or infinity occurs when one cell in the 2×2 table is zero. OR = 0 when a·d = 0, and OR is undefined (infinity) when b·c = 0. This indicates complete separation — one group has zero occurrences of the outcome. In such cases, add 0.5 to each cell (Haldane-Anscombe correction) for estimation purposes.

The odds ratio compares odds (probability of event / probability of no event), while relative risk compares probabilities directly. For rare outcomes (< 10% prevalence), OR ≈ RR. For common outcomes, OR overestimates RR. OR is symmetric (swapping rows and columns gives 1/OR), making it suitable for case-control studies where disease rates cannot be estimated.

Yes, Fisher's exact test can be generalized to r×c tables, though computation becomes intensive for larger tables. The Freeman-Halton extension handles tables larger than 2×2. For practical purposes, many software packages implement exact tests for tables up to moderate size using network algorithms.

Computing Fisher's exact p-value requires factorial calculations that can overflow for even moderate sample sizes. This calculator provides the odds ratio, risk ratio, and table structure. For the exact p-value, use the table marginals with a statistical software package or online tool that implements arbitrary-precision arithmetic.

A 95% CI for OR that does not include 1 indicates a statistically significant association at α = 0.05. The CI width reflects precision — wider intervals indicate less precision (often due to small samples). CIs are typically calculated on the log scale and back-transformed: exp(ln(OR) ± 1.96 × SE(ln(OR))).

Sources & Methodology

Fisher, R.A. (1935). The Logic of Inductive Inference. Journal of the Royal Statistical Society, 98(1), 39-82. | Agresti, A. (2002). Categorical Data Analysis, 2nd Edition. Wiley. | Bland, J.M. & Altman, D.G. (2000). The Odds Ratio. BMJ, 320(7247), 1468.
R

Roboculator Team

The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.

How helpful was this calculator?

Be the first to rate!

Related Calculators

P-Value Calculator

Statistical Inference & Hypothesis Testing

Confidence Interval Calculator

Statistical Inference & Hypothesis Testing

Margin of Error Calculator

Statistical Inference & Hypothesis Testing

Sample Size Calculator

Statistical Inference & Hypothesis Testing

Critical Value Calculator

Statistical Inference & Hypothesis Testing

Z-Test Calculator

Statistical Inference & Hypothesis Testing