Fisher Exact Test 2x2 Calculator

Enter four counts, choose a tail, and compare evidence. See exact p-values, odds ratios, risks. Export reports for clean review and shared records today.

Calculator

Example Data Table

Group Event No event Total
Treatment 8 2 10
Control 1 9 10
Total 9 11 20

Formula Used

For a 2x2 table with cells a, b, c, and d, Fisher exact testing conditions on fixed row and column margins.

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

Here, r1 and r2 are row totals. c1 is the first column total. n is the grand total. The two-sided p-value sums tables with probability no greater than the observed table probability.

Odds ratio = (a × d) / (b × c). Risk ratio and risk difference are also reported for practical comparison.

How to Use This Calculator

Enter the four observed counts in the matching cells. Use whole numbers only. Label rows and columns if needed. Choose a two-sided, left-tailed, or right-tailed test before reviewing the result. Select an interval level for the odds ratio estimate. Submit the form to calculate. Use CSV or PDF buttons to save the report.

Why Fisher Exact Testing Matters

Fisher exact testing is used with a 2x2 contingency table. It is helpful when sample sizes are small. It is also useful when expected counts are low. The method does not depend on a large sample approximation. Instead, it uses the hypergeometric distribution and fixed margins.

When To Prefer It

Use this test when two categorical variables are compared. Each variable should have two levels. Common examples include exposed versus unexposed groups and event versus no event outcomes. The test checks whether the observed table is unusual under the null hypothesis of no association.

Interpreting Results

The p-value shows how surprising the table is, assuming no association. A small p-value suggests the row and column variables may be related. The odds ratio gives the estimated strength of association. A value above one suggests higher odds in the first row. A value below one suggests lower odds.

Tail Choices

A two-sided test looks for association in either direction. A left-tailed test checks whether the first row has lower odds. A right-tailed test checks whether the first row has higher odds. Choose the tail before reading results. Changing the tail after seeing data can bias the decision.

Effect Measures

The calculator also reports risk in each row. Risk difference compares the two proportions directly. Risk ratio compares them by division. Odds ratio compares the odds of the outcome across rows. These estimates help explain practical size, while the p-value addresses statistical evidence.

Good Practice

Report the table, chosen alternative, p-value, and odds ratio together. Mention whether any correction was used for interval estimates. For zero cells, the Haldane-Anscombe correction can stabilize estimated odds ratios and confidence intervals. It should not change the exact Fisher probability calculation.

Limits

Fisher exact testing is exact for fixed margins. In some studies, margins may not be fixed by design. The test is still widely used, but context matters. For larger studies, chi-square methods may also be considered. Use judgment, study design, and subject knowledge together.

Practical Notes

Keep raw counts nonnegative and whole. Do not enter percentages. Check that rows and columns match the research question. Save reports with inputs, because small table conclusions can change when one count changes slightly.

FAQs

What is Fisher exact test?

It is an exact test for association in a contingency table. For this calculator, it evaluates a 2x2 table using fixed margins and the hypergeometric distribution.

When should I use this instead of chi-square?

Use it when samples are small or expected counts are low. It avoids large sample assumptions, so it is common for sparse 2x2 tables.

What does a two-sided p-value mean?

It measures evidence against no association in either direction. This calculator sums tables with probabilities at least as extreme as the observed probability.

What is the odds ratio?

The odds ratio compares outcome odds between the two rows. Values above one suggest higher odds in row one. Values below one suggest lower odds.

Why use a 0.5 correction?

A zero cell can make the odds ratio infinite or undefined. Adding 0.5 to each cell stabilizes effect estimates and approximate intervals.

Does the correction change Fisher p-values?

No. This calculator uses original counts for Fisher probabilities. The correction affects only effect estimates and confidence interval calculations.

What are left and right tails?

The left tail checks for lower odds in row one. The right tail checks for higher odds in row one. Choose the direction before analysis.

Can I use percentages as inputs?

No. Fisher exact testing needs observed whole-number counts. Enter the actual counts in each of the four table cells.

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.