Fisher Exact P Value Calculator

Build exact evidence from small sample tables. Review tails, odds ratios, risks, confidence, and exports. Use clear outputs for stronger statistical decisions in reports.

Calculator

Example Data Table

Group Recovered Not Recovered Total
Treatment 8 2 10
Control 1 5 6
Total 9 7 16

This example can be entered as A = 8, B = 2, C = 1, and D = 5.

Formula Used

The calculator treats the first cell as a hypergeometric random variable.

P(X = x) = [C(c1, x) × C(c2, r1 - x)] / C(n, r1)

Here, r1 is the first row total. c1 and c2 are column totals. n is the grand total.

The left-tailed p value sums probabilities where X is less than or equal to A.

The right-tailed p value sums probabilities where X is greater than or equal to A.

The two-sided p value sums tables with probabilities not greater than the observed table probability.

Odds ratio = (A × D) / (B × C)

Risk difference = A / (A + B) - C / (C + D)

Relative risk = [A / (A + B)] / [C / (C + D)]

How to Use This Calculator

Enter the four observed counts from a two by two table.

Use row and column labels when you need clearer exported reports.

Select the alternative hypothesis before calculation.

Use two-sided testing for general association questions.

Set alpha to your chosen decision limit.

Set the confidence level for the odds ratio interval.

Click calculate to show the result above the form.

Use CSV or PDF downloads to save the results.

Understanding Fisher Exact Testing

Fisher exact testing is useful when counts are small. It studies a two by two table. The method keeps row and column totals fixed. Then it checks how unusual the observed table is. This makes it different from many large sample tests.

When To Use It

Use this calculator for paired categories. Common cases include treatment against control, pass against fail, or exposed against not exposed. It works well when any expected cell count is low. It is also helpful when sample sizes are uneven. The result is an exact p value, not a rough approximation.

What The Inputs Mean

Cell A is the count in row one and column one. Cell B is row one and column two. Cell C is row two and column one. Cell D is row two and column two. Labels are optional. They make exported reports easier to read. The alternative hypothesis controls the tail direction. Two sided is the usual choice. Left or right sided tests support directional questions.

Reading The Result

A small p value means the observed arrangement is rare under independence. It does not measure effect size. For that reason, the calculator also gives an odds ratio. It adds risk values, risk difference, and relative risk. These values describe practical strength. Confidence limits help show uncertainty around the odds ratio.

Why Exact Counts Matter

Small samples can mislead approximate tests. Fisher testing avoids that issue by using the hypergeometric distribution. Every possible table with the same margins is evaluated. The p value is built from those exact probabilities. This is why the method is respected in clinical, survey, quality, and experiment reports.

Good Practice

Choose the hypothesis before reviewing the result. Do not switch tails after seeing the p value. Check the table orientation before interpreting odds ratios. A reversed row or column can invert the effect. Export the results for records. Keep the original counts with the report. Counts explain the conclusion better than a p value alone.

Limitations

The test shows association, not causation. Study design still matters. Very large counts may make exact sums slower. In that case, compare with a chi square test. Always report full context with every statistical result carefully.

FAQs

What is Fisher exact test?

It is an exact test for association in a two by two table. It is often used when sample sizes are small or expected counts are low.

When should I use a two-sided p value?

Use a two-sided p value when you want to test for any association. It does not assume the direction before calculation.

What does a small p value mean?

It means the observed table is unlikely under the null hypothesis of independence. It does not prove cause or practical importance.

Can I use zero counts?

Yes. The exact p value can handle zero cells. The odds ratio interval uses a small correction when any cell is zero.

What is the odds ratio?

The odds ratio compares event odds between the two rows. Values above one suggest higher odds in the first row.

What is the mid-p option?

Mid-p subtracts half the observed table probability from the selected exact p value. Some analysts use it to reduce conservativeness.

Is this better than chi square testing?

It is often better for small samples. Chi square testing is faster for large samples, but it is approximate.

What should I export?

Export the counts, p value, hypothesis direction, odds ratio, confidence interval, and decision. These items make the report easier to review.

Related Calculators

Paver Sand Bedding Calculator (depth-based)Paver Edge Restraint Length & Cost CalculatorPaver Sealer Quantity & Cost CalculatorExcavation Hauling Loads Calculator (truck loads)Soil Disposal Fee CalculatorSite Leveling Cost CalculatorCompaction Passes Time & Cost CalculatorPlate Compactor Rental Cost CalculatorGravel Volume Calculator (yards/tons)Gravel Weight Calculator (by material type)

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.