Fisher's Exact Test Calculator

Perform Fisher's exact test on a 2x2 contingency table to determine if there is a significant association between two categorical variables.

P-VALUE (TWO-TAILED)
--
Odds Ratio
--
P-value
--
Significant?
--
Total N
--

What Is Fisher's Exact Test?

Fisher's exact test determines whether there is a significant association between two categorical variables in a 2x2 contingency table. Unlike the chi-square test, it calculates the exact probability rather than relying on a large-sample approximation, making it valid for any sample size including very small ones.

The test was developed by Ronald Fisher in the 1930s and uses the hypergeometric distribution. It is the gold standard for 2x2 tables when any expected cell count is below 5, though it works correctly for all sample sizes.

When to Use It

  • Small sample sizes (n < 20)
  • Any expected cell count < 5
  • When exact p-values are needed (clinical trials)
  • 2x2 tables with categorical data

The 2x2 Table

Outcome 1Outcome 2Total
Group 1aba+b
Group 2cdc+d
Totala+cb+dn

Interpretation

If p < 0.05, we reject the null hypothesis that the two variables are independent. The odds ratio quantifies the strength of association: OR > 1 means Group 1 has higher odds of Outcome 1, OR < 1 means lower odds.

Frequently Asked Questions

Fisher's vs chi-square: which to use?

Fisher's exact test is always valid. Chi-square is an approximation that works well when all expected counts are >= 5. For small samples, always use Fisher's. For large samples, both give virtually identical results.

Can Fisher's test be used for larger tables?

The exact test extends to RxC tables but becomes computationally intensive. For tables larger than 2x2, the Freeman-Halton extension or chi-square test is typically used.

What is the odds ratio?

OR = (a×d)/(b×c). An OR of 1 means no association. OR > 1 means positive association (Group 1 more likely to have Outcome 1). OR < 1 means negative association.