Fisher's Exact Test Calculator

Enter the four cell counts of your 2×2 contingency tablea, b, c, and d — and choose between a one-tailed or two-tailed test. The Fisher's Exact Test Calculator computes the exact p-value to determine whether a statistically significant association exists between two categorical variables, even when sample sizes are small or expected cell frequencies fall below 5.

Count for Group 1 / Category 1

Count for Group 1 / Category 2

Count for Group 2 / Category 1

Count for Group 2 / Category 2

Results

Two-Tailed P-Value

--

One-Tailed P-Value

--

Odds Ratio

--

Total Sample Size (n)

--

Significance (α = 0.05)

--

Contingency Table Cell Counts

Frequently Asked Questions

What is Fisher's Exact Test?

Fisher's Exact Test is a statistical test of independence used for categorical data arranged in a 2×2 contingency table. Unlike the chi-square test, it calculates the exact probability of observing the data (or something more extreme) under the null hypothesis that the two variables are independent. It was developed by Ronald Fisher in 1922.

When should I use Fisher's Exact Test instead of the Chi-Square Test?

Use Fisher's Exact Test when your sample size is small or when any expected cell frequency is less than 5. The chi-square test relies on a large-sample approximation that becomes unreliable under these conditions. Fisher's test computes the exact p-value without any approximation, making it the preferred choice for sparse data.

What is a 2×2 contingency table?

A 2×2 contingency table displays the frequency counts of subjects classified by two categorical variables, each with exactly two possible outcomes. The four cells (a, b, c, d) represent the cross-classification of the two factors — for example, smokers vs. non-smokers further divided by whether they have lung cancer or not.

How do I interpret the p-value from Fisher's Exact Test?

If the p-value is less than your significance threshold (commonly 0.05), you reject the null hypothesis and conclude there is a statistically significant association between the two variables. If the p-value is ≥ 0.05, the data do not provide sufficient evidence of an association. A smaller p-value indicates stronger evidence against the null hypothesis.

What is the difference between a one-tailed and two-tailed Fisher's Exact Test?

A two-tailed test assesses whether the association goes in either direction (either group could have a higher proportion), and is the recommended default in most research. A one-tailed test is used when you have a specific directional hypothesis — for example, expecting Group 1 to have a higher proportion in Category 1. The two-tailed p-value is always the more conservative choice.

What does the odds ratio represent in this test?

The odds ratio (OR) quantifies the strength and direction of the association between the two variables. An OR of 1 means no association. An OR greater than 1 means the outcome is more likely in Group 1, while an OR less than 1 means it is less likely. It is calculated as (a × d) / (b × c) from the 2×2 table.

What are the assumptions of Fisher's Exact Test?

Fisher's Exact Test assumes that observations are independent, that each subject appears in only one cell, and that the row and column totals are fixed. It makes no distributional assumptions, which is why it produces an exact p-value. It is appropriate for any 2×2 table but is especially valuable when counts are small.

How is Fisher's Exact Test calculated?

The probability of observing a specific table configuration is calculated using the hypergeometric distribution formula: P = [(a+b)! × (c+d)! × (a+c)! × (b+d)!] / [n! × a! × b! × c! × d!], where n is the total sample size. The exact p-value is the sum of probabilities for all tables as extreme as or more extreme than the observed table.

More Statistics Tools