Fisher's Exact Test Calculator
Run Fisher's exact test on any 2x2 table. Get exact one- and two-tailed p-values from the hypergeometric distribution, plus the sample odds ratio.
Frequently Asked Questions about the Fisher's Exact Test Calculator
What is Fisher's exact test used for?
Fisher's exact test checks whether the two categorical variables in a 2x2 table are associated. It computes an exact p-value directly from the hypergeometric distribution instead of relying on a large-sample approximation. That makes it the standard choice when your sample is small or some expected cell counts fall below 5, where the chi-square test can be unreliable.
How does this calculator compute the p-value?
It holds the row totals and column totals fixed and sums the hypergeometric probability of every table at least as extreme as yours. The two-tailed value adds up all tables whose probability is no greater than the observed table's. Each one-tailed value sums only the tables in one direction, either P(X <= a) for the left tail or P(X >= a) for the right tail.
When should I use the one-tailed or the two-tailed p-value?
Use the two-tailed p-value when you only ask whether an association exists, without predicting its direction. Use a one-tailed p-value when your hypothesis specifies the direction before you see the data, for example that a treatment raises the success rate. The two-tailed value is the safer default and the one most journals expect.
What does the odds ratio tell me?
The odds ratio is the cross-product a times d divided by b times c. A value of 1 means both rows have the same odds of landing in column 1. Above 1 means the column 1 outcome is relatively more likely in row 1 than in row 2, and below 1 means it is relatively less likely. The calculator returns undefined when cell b or c is zero, since the ratio would divide by zero.
How is Fisher's exact test different from the chi-square test?
Both test for association in a contingency table, but the chi-square test uses a continuous approximation that can be inaccurate for small or sparse tables. Fisher's exact test gives an exact probability with no approximation, so it stays valid when counts are low. For large samples the two methods usually agree closely.
What numbers should I enter in each cell?
Enter whole, non-negative counts in the four cells a, b, c, and d, from 0 up to 100,000 per cell. The test expects raw frequencies, not percentages or rates, so convert any proportions back to counts first. Cells a and b make up the first row (group), while c and d make up the second.
Related Calculators
More calculators in "Math"
Haversine Distance CalculatorJacobian Matrix CalculatorMann-Whitney U Test CalculatorPartial Derivative CalculatorRepeating Decimal to Fraction CalculatorShannon Entropy Calculator
See all 202 calculators in "Math"