2 × 2 TABLE
FISHER'S EXACT TEST CALCULATOR
Fisher's exact test calculator for a 2 × 2 table.
Test whether two yes/no variables are related when your sample is small or expected counts are below 5. Get the exact two-sided and one-sided p values, the odds ratio with a 95% CI, and an APA sentence.METHOD
Fisher's exact test: when to use it, formula, and reporting
What is Fisher's exact test?
Fisher's exact test checks whether two yes/no variables are related in a 2 × 2 table. Unlike the chi-square test, it calculates the exact probability of the observed table and anything more extreme, so it stays accurate when the sample is small or some expected counts are below 5.
Formula
P(table) = (a+b)! (c+d)! (a+c)! (b+d)! ÷ (n! a! b! c! d!)The probability of every table with the same row and column totals is computed from the hypergeometric distribution. The two-sided p value adds the probabilities of all tables that are no more likely than the one you observed.
Worked example
Treatment: 8 improved, 2 did not. Control: 1 improved, 5 did not (n = 16).
- Row totals are 10 and 6; column totals are 9 and 7.
- Sum the probabilities of all tables as unlikely as this one: two-sided p = .035.
- The odds ratio is (8 × 5) ÷ (2 × 1) = 20.00.
- Report: Fisher's exact test, p = .035, OR = 20.00, 95% CI [1.42, 282.45].
Fisher's exact test or chi-square?
- Any expected count below 5 in a 2 × 2 table: use Fisher's exact test
- Large sample, all expected counts 5 or more: chi-square is fine and gives almost the same p
- Same people measured twice (before and after): use McNemar's test instead
How to report it (APA style)
Give the percentages in each group, then the test: “80.0% of the treatment group improved compared with 16.7% of the control group, Fisher's exact test, p = .035, OR = 20.00, 95% CI [1.42, 282.45].” The wide CI reflects the small sample.
References
- Fisher, R. A. (1922). On the interpretation of χ² from contingency tables, and the calculation of P. Journal of the Royal Statistical Society, 85(1), 87–94.
- Agresti, A. (2013). Categorical data analysis (3rd ed.). Wiley.
ABOUT THIS TOOL
Fisher's Exact Test Calculator
Test the link between two yes/no variables when the sample is small or expected counts are below 5, with exact two-sided and one-sided p values and the odds ratio.
- Compare pass rates of two small groups
- Test a 2×2 table where expected counts are below 5
- Report an odds ratio for a small case-control study
KEY FUNCTIONS
USE IN YOUR THESIS
Cite this calculator and export your results
APA 7 reference for software or an online tool. Cite the statistical method in your text as well.
SolveGrid. (2026). Fisher's Exact Test Calculator [Online calculator]. https://solvegrid.online/fishers-exact-test-calculator
LEARN THE METHOD
Guides for this calculator workflow
Chi-Square Test Calculator
Test whether two categorical variables are associated, or whether counts match expected proportions, with expected-count checks and a ready-to-use APA write-up.
McNemar Test Calculator
Test whether a proportion changed between two related measurements on the same people, with the exact test for small samples, the odds ratio, and a ready APA sentence.
Effect Size Calculator
Get the effect size for any common test in seconds, from raw summary statistics or from a reported t, F, or z value, with benchmarks and APA wording.