Fisher Exact Test Calculator: 6 Clear Steps for Small Samples

Small sample? Low expected counts? This is where many students get stuck.

Use this Fisher exact test calculator when you need to test association in a 2×2 table and the usual chi-square approximation may not be the best choice. It is especially helpful when one or more expected counts are small. You will get the exact p-value, expected counts, a decision, and a plain-language conclusion you can use in homework or research writing.

📊 Fisher’s Exact Test Calculator

Use this calculator for a 2×2 table when you want an exact p-value, especially if expected counts are small. Enter the four cell counts, choose the alternative hypothesis and α level, then click Calculate to see the p-value, expected counts, and plain-language interpretation.

Inputs

Enter whole-number counts, not percentages or proportions.

Results

Enter values, then click Calculate.

What this means

The interpretation will appear here after you calculate the test.
Show steps / formulas

Hypotheses

  • H0: The two categorical variables are independent in the population (odds ratio = 1).
  • H1: The two categorical variables are associated in the population (odds ratio ≠ 1).

Formulas

  • Expected count in each cell: Eij = (row total × column total) / n
  • Observed-table probability under H0: P(a) = [C(col1, a) × C(col2, row1 - a)] / C(n, row1)
  • Two-sided Fisher p-value: sum of probabilities of all valid tables with probability less than or equal to the observed table probability.
  • Left-tailed Fisher p-value: sum of probabilities from the minimum possible a up to the observed a.
  • Right-tailed Fisher p-value: sum of probabilities from the observed a up to the maximum possible a.

Variable definitions

  • a, b, c, d are the four observed cell counts in the 2×2 table.
  • row1 = a + b, row2 = c + d
  • col1 = a + c, col2 = b + d
  • n = a + b + c + d

Your worked steps will appear here after calculation.

Common mistakes

  • Entering percentages instead of whole-number counts.
  • Using this tool for tables larger than 2×2.
  • Thinking the p-value shows the strength of association. It does not.
  • Ignoring the direction of the alternative hypothesis when using a one-tailed test.
  • Interpreting statistical significance as proof of causation.
  • Using Fisher’s exact test on data that are not independent observations.

Still unsure whether to use Fisher’s exact test or a different hypothesis test? Try the Statistical Test Selector.

What this calculator does

A fisher exact test calculator checks whether two categorical variables are associated in a 2×2 contingency table. In plain language, it helps you compare two groups when the outcome has two categories, such as yes/no, success/failure, or improved/not improved. The main result is the exact p-value, which is useful when sample size is small or expected counts are low.

This calculator also shows the parts students usually need for school procedure: the observed table, expected counts, hypotheses, p-value, decision, and interpretation. That makes it useful for assignments, reports, and first-pass research checks. Fisher’s exact test works from the table counts directly and evaluates how unusual your observed table is under the null hypothesis of no association.

For the bigger picture, start with the Statistics hub and the Hypothesis Tests hub.

When to use it

Use Fisher’s exact test when:

  • you have two categorical variables
  • each variable has two categories, so the table is 2×2
  • the observations are counts, not percentages
  • the observations are independent
  • the sample is small or one or more expected counts are low

Do not use it when:

  • your data are measurements like height, time, weight, or score
  • your table is larger than 2×2 and your course has not asked for an exact extension
  • your data are paired or matched in a way that needs a different method
  • you only have percentages and not the original counts

A helpful rule of thumb is this: if you are comparing two percentages in two independent groups, you may be choosing between a two-proportion z test, a chi-square test, or Fisher’s exact test. Fisher’s exact test is the clean choice when the setup is 2×2 and expected counts are small. When counts are larger, chi-square often gives a close approximation.

How it works

Start with a 2×2 table of counts:

Outcome YesOutcome No
Group 1ab
Group 2cd

The calculator first finds the row totals, column totals, and expected counts. Expected counts help you judge whether the chi-square approximation may be weak. Then Fisher’s exact test looks at the probability of getting your observed table, and tables at least as extreme, assuming the null hypothesis is true. This probability comes from the hypergeometric distribution, which is why the test gives an exact p-value instead of a large-sample approximation.

The null hypothesis says there is no association between the two categorical variables. The alternative says there is an association. If the p-value is small enough, usually less than or equal to your chosen alpha level such as 0.05, you reject the null hypothesis.

Step-by-step example

Suppose a teacher wants to compare pass/fail results for two review methods:

PassedFailed
Method A19
Method B82

We want to test whether review method and result are associated.

Step 1: State the hypotheses

  • H₀: Review method and result are independent.
  • H₁: Review method and result are associated.

Step 2: Find the totals

  • Row totals: 10 and 10
  • Column totals: 9 passed and 11 failed
  • Grand total: 20

Step 3: Find the expected counts

Use:

Expected count = (row total × column total) / grand total

So the expected counts are:

  • Method A, Passed: (10 × 9) / 20 = 4.5
  • Method A, Failed: (10 × 11) / 20 = 5.5
  • Method B, Passed: (10 × 9) / 20 = 4.5
  • Method B, Failed: (10 × 11) / 20 = 5.5

At least one expected count is below 5, so Fisher’s exact test is a strong choice here.

Step 4: Compute the exact p-value

Fisher’s exact test uses the hypergeometric idea to find the probability of the observed table and tables at least as extreme under H₀. For this table, the two-sided p-value is about 0.0055.

Step 5: Make the decision

If α = 0.05, then:

  • p = 0.0055
  • p ≀ 0.05

So we reject H₀.

Step 6: Write the conclusion

There is statistically significant evidence of an association between review method and pass/fail result.

Example write-up

A Fisher’s exact test showed a statistically significant association between review method and pass/fail result, p = 0.0055. Because at least one expected count was small, Fisher’s exact test was appropriate for this 2×2 table.

mistakes

Common mistakes

1. Using percentages instead of counts

Fisher’s exact test needs the original frequencies in each cell, not percentages.

2. Using it for non-2×2 data

This page is for the standard 2×2 Fisher setup. If your table is larger, this is not the right tool as written.

3. Choosing Fisher only because the sample “feels small”

The better question is whether you have a 2×2 table and whether expected counts are small. That is the real method-choice issue.

4. Saying the p-value measures effect size

It does not. The p-value tells you how compatible the data are with the null hypothesis. It does not tell you how large or important the association is.

5. Forgetting the independence condition

If observations are not independent, the result can be misleading.

6. Thinking “significant” means “caused by”

A significant Fisher result suggests association, not automatic proof of causation.

FAQs: Fisher Exact Test Calculator

What does this result mean?

It tells you whether your 2×2 table gives enough evidence of an association between the two categorical variables. If the p-value is less than or equal to α, reject H₀. If not, fail to reject H₀.

When should I use Fisher’s exact test instead of chi-square?

Use Fisher’s exact test when your data form a 2×2 table and one or more expected counts are small. Chi-square is often fine when counts are larger and the approximation is good.

Which test should I use: Fisher’s exact test or two-proportion z test?

If you are comparing two independent groups with a yes/no outcome, both may be discussed in class. Use Fisher’s exact test when the setup is 2×2 and expected counts are small. Use two-proportion z when the normal approximation conditions are met and your class expects a proportion test. See the Two-Proportion z Test Calculator for that setup.

Why is my answer different from my teacher’s or software output?

The most common reason is the two-sided p-value convention. Some software defines “two-sided” Fisher p-values slightly differently. Another reason is rounding. Your teacher may also expect chi-square instead of Fisher for the same table.

Is Fisher’s exact test only for small samples?

It is most famous for small samples and low expected counts, but modern software can compute it more broadly. Still, for this page, the main use case is small-sample 2×2 categorical comparison.

What are expected counts, and why do they matter?

Expected counts are the counts you would expect in each cell if the variables were independent. They matter because very small expected counts can make the chi-square approximation less reliable.

Can I use Fisher’s exact test for paired data?

Not usually. Standard Fisher’s exact test on this page assumes independent observations in a 2×2 table. If your data are matched pairs, you likely need a different method.

Related BrainMattersLearning statistics tools

Use these internal links to guide readers to the next best tool:

Sideways / forward links

Related tools block

  • Fisher’s exact test for small-sample 2×2 tables
  • Chi-square test for broader categorical table work
  • Two-proportion z test for comparing two percentages under large-sample conditions
  • Statistical Test Selector if you are not sure which procedure fits your data

References

Agresti, A. (2018). An introduction to categorical data analysis (3rd ed.). Wiley.

National Institute of Standards and Technology. (n.d.). How can we determine whether two processes produce the same proportion of defects? https://www.itl.nist.gov/div898/handbook/prc/section3/prc33.htm

Penn State Eberly College of Science. (n.d.). 8.1 – Statistical analysis | STAT 555. https://online.stat.psu.edu/stat555/node/83/

Scroll to Top