Enter a 2×2 contingency table using non-negative integer counts. This calculator returns left-tailed, right-tailed, and two-sided Fisher's exact test p-values.
| Outcome + | Outcome - | |
|---|---|---|
| Group A | ||
| Group B |
What is Fisher's exact test?
Fisher's exact test is a statistical significance test used for 2×2 categorical tables. It tells you whether the distribution of counts between two groups is likely due to chance, under the null hypothesis that the row and column variables are independent.
Unlike large-sample approximations, Fisher's test calculates an exact probability using the hypergeometric distribution. That makes it especially useful for small sample sizes, rare outcomes, or tables with very uneven counts.
When should you use a Fisher's exact calculator?
Use Fisher's exact when:
- Your data form a 2×2 contingency table.
- Expected cell counts are small (a common rule is any expected count < 5).
- You want an exact p-value rather than a chi-square approximation.
- You are analyzing clinical, biological, survey, or A/B test data with sparse outcomes.
Common examples
- Treatment vs control and response vs no response.
- Exposure vs no exposure and disease vs no disease.
- Feature enabled vs disabled and conversion vs non-conversion.
How this Fisher's exact calculator works
The four input cells define this table:
[ c d ]
With fixed row and column totals, the calculator computes the probability of observing each feasible value for the top-left cell using:
Where r1 is row 1 total, c1 and c2 are column totals, and n is total sample size. It then reports:
- Left-tailed p-value: probability of tables with x ≤ observed x.
- Right-tailed p-value: probability of tables with x ≥ observed x.
- Two-sided p-value: sum of probabilities less than or equal to the observed table probability (standard Fisher two-sided definition).
Interpreting the results
If your p-value is below your chosen significance level (often 0.05), you reject the null hypothesis of independence. In plain language, the group and outcome appear associated.
The output also includes the odds ratio:
- Odds ratio > 1 suggests higher odds of Outcome+ in Group A than Group B.
- Odds ratio < 1 suggests lower odds in Group A.
- Odds ratio ≈ 1 suggests little difference in odds.
Practical tips
- Use integer counts only; do not enter percentages.
- Set your one-tailed direction before analysis when possible.
- Report both p-value and effect size (like odds ratio) for better interpretation.
- For publication-quality inference, consider confidence intervals in statistical software.
Quick FAQ
Is Fisher's exact test only for small samples?
It is valid for all sample sizes, but it is most commonly used when sample sizes are small or sparse.
How is this different from chi-square?
Chi-square uses an approximation that may be inaccurate with low expected counts. Fisher's exact test computes exact probabilities conditional on fixed margins.
Can I use this for tables bigger than 2×2?
No. This page is specifically for 2×2 tables.