fisher exact test calculator 2x2

2x2 Fisher Exact Test Calculator

Enter non-negative integer counts for your contingency table.

Outcome + Outcome -
Group 1
Group 2

Outputs include two-sided, left-tailed, and right-tailed p-values, plus odds ratio estimates.

What this calculator does

This page computes the Fisher exact test for a 2x2 contingency table. It is the preferred method when sample sizes are small or when expected cell counts are low. Unlike chi-square methods, Fisher’s exact test does not rely on large-sample approximations.

When to use Fisher’s exact test (2x2)

  • You are comparing two groups across a binary outcome (yes/no, event/no event).
  • Your total sample is modest, or one or more expected counts are below 5.
  • You want an exact p-value based on the hypergeometric distribution.

Typical examples

  • Treatment vs control and improved vs not improved.
  • Exposed vs unexposed and disease vs no disease.
  • Pass vs fail by study method A vs B.

How the 2x2 Fisher exact test works

For fixed row and column totals, Fisher’s test evaluates all possible 2x2 tables compatible with those margins. It computes each table’s exact probability using the hypergeometric model, then sums probabilities according to the chosen tail definition.

This calculator reports:

  • Two-sided p-value (sum of probabilities less than or equal to the observed table probability).
  • Left-tailed p-value (tables as or more extreme in the lower direction).
  • Right-tailed p-value (tables as or more extreme in the upper direction).
  • Odds ratio and a continuity-corrected 95% CI estimate.

How to interpret the results

The key number is usually the two-sided p-value. If it is below your significance level (commonly 0.05), you reject the null hypothesis of no association between rows and columns.

  • p < 0.05: evidence of an association.
  • p ≥ 0.05: insufficient evidence of an association.

The odds ratio helps with effect size interpretation:

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

Practical notes and caveats

1) One-sided vs two-sided

Use a one-sided test only if direction was pre-specified before looking at the data. Otherwise, two-sided is standard.

2) Zero cells

Zero counts are allowed in Fisher’s test. However, the raw odds ratio can become infinite or undefined. This calculator also provides a 0.5 continuity-corrected OR and CI to keep interpretation stable.

3) Statistical significance is not practical significance

A small p-value does not guarantee a large or meaningful effect. Always pair p-values with effect size, confidence intervals, and domain context.

FAQ

Can I use decimals?

No. Cell values must be non-negative integers because they represent counts.

Is this the same as chi-square?

Both test association in contingency tables. Fisher’s exact test is exact and best for small samples; chi-square is approximate and often used for larger samples.

What if my table is larger than 2x2?

This calculator is specifically for 2x2. Larger tables require generalized exact tests or alternative methods.

🔗 Related Calculators