# Fisher's Exact Test Calculator

Free Fisher's exact test calculator for 2x2 tables. Get exact p-value, odds ratio, and relative risk. No large-sample assumption required.

## What this calculates

Perform Fisher's exact test on a 2x2 contingency table to test whether there is a significant association between two categorical variables. Unlike the chi-square test, Fisher's exact test gives exact p-values and works with small sample sizes.

## Inputs

- **Cell a (Row 1, Col 1)** — min 0 — Count in row 1, column 1.
- **Cell b (Row 1, Col 2)** — min 0 — Count in row 1, column 2.
- **Cell c (Row 2, Col 1)** — min 0 — Count in row 2, column 1.
- **Cell d (Row 2, Col 2)** — min 0 — Count in row 2, column 2.

## Outputs

- **P-Value (two-sided)** — Two-sided p-value from Fisher's exact test.
- **Odds Ratio** — Odds ratio (a*d)/(b*c).
- **Relative Risk** — Relative risk of outcome given exposure.
- **Significance (α = 0.05)** — formatted as text — Whether the result is significant at the 5% level.

## Details

Fisher's exact test computes the exact probability of observing the data (or more extreme) under the null hypothesis of no association. It enumerates all possible 2x2 tables with the same marginal totals and sums the probabilities of tables as extreme as or more extreme than the observed one.

When to use Fisher's exact test: Use it when any expected cell count in your 2x2 table is less than 5, or when you want an exact (rather than approximate) p-value. For larger samples, it gives the same conclusions as the chi-square test but is computationally more demanding.

Odds ratio and relative risk: The odds ratio (OR = ad/bc) measures the strength of association on the odds scale. An OR of 1 means no association. The relative risk (RR) compares the probability of the outcome between groups and is often more intuitive in medical studies.

## Frequently Asked Questions

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

A: Use Fisher's exact test when your sample is small (any expected count < 5), when you want an exact p-value rather than an approximation, or as a general-purpose test for 2x2 tables. Chi-square is an approximation that improves with larger samples.

**Q: What does two-sided mean in this context?**

A: A two-sided test considers extreme tables in both directions (association could go either way). The two-sided p-value sums probabilities of all tables whose probability is less than or equal to the observed table's probability, regardless of direction.

**Q: How do I set up my 2x2 table?**

A: Rows represent the grouping variable (e.g., treatment vs. control) and columns represent the outcome (e.g., success vs. failure). Cell 'a' is group 1 with outcome 1, 'b' is group 1 with outcome 2, 'c' is group 2 with outcome 1, 'd' is group 2 with outcome 2.

---

Source: https://vastcalc.com/calculators/statistics/fisher-exact-test
Category: Statistics
Last updated: 2026-04-21
