Fisher's Exact Test Calculator (2×2)
Exact one- and two-sided p-values and the odds ratio for a 2×2 contingency table.
Fisher's exact test adds the hypergeometric probabilities of every table with the same margins that is as or less likely than the one observed. For the table [1, 9; 11, 3], two-sided p = 0.0028, a significant association.
Free, runs in your browser. Nothing you enter is uploaded.
How to use it
- Enter the four cell counts of your 2×2 table.
- Read the two-sided p-value (or a one-sided p if you planned a direction).
- Report the odds ratio with the p-value.
What you enter
- Four cell counts a, b, c, d
What you get
- Two-sided p-value
- One-sided p-values
- Odds ratio
Formula
P(a) = C(a+b, a) × C(c+d, c) / C(n, a+c)
Worked example
Input: Group 1: 1 yes, 9 no; Group 2: 11 yes, 3 no
Result: Two-sided p = 0.0028; OR = 0.03
Strong evidence that the outcome differs between groups.
Questions
When should I use Fisher's exact test instead of chi-square?
When any expected cell count is below 5, which happens with small samples. Fisher's test is exact at any sample size.
What is the null hypothesis?
That the row and column variables are independent, so the odds ratio is 1.
One-sided or two-sided?
Use two-sided unless you decided on the direction before seeing the data.
Why might my p-value differ from another program?
Programs differ in how they define the two-sided p. This calculator sums tables with probability at or below the observed one, as R and SAS do.
References
- Fisher RA (1922) Journal of the Royal Statistical Society 85(1):87-94.
Related reading
- Fisher's Exact Test vs. Chi-Square: When to Use Each
- Chi-Square Test of Independence vs. Fisher's Exact Test
More Statistics
- Standard Deviation Calculator
- Mean, Median & Mode Calculator
- Variance Calculator
- Z-Score Calculator
- P-Value Calculator
- Confidence Interval Calculator
- T-Test Calculator
- Chi-Square Test Calculator
- Correlation Coefficient Calculator
- Linear Regression Calculator
- Normal Distribution Calculator
- Probability Calculator
All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.