Statistical Calculators › Proportions: One and Two Groups › Fisher’s Exact Test Sample Size Calculator
← All Calculators

Proportions: One and Two Groups

Fisher's Exact Test Sample Size Calculator

Exact sample size calculation for comparing two independent proportions with a two-sided Fisher's Exact Test. The calculator enumerates all possible 2×2 outcomes under the assumed alternative proportions and finds the smallest equal group size that reaches the requested statistical power.

Study Design

Enter the expected proportions, significance level, and desired power. Equal allocation is used, matching the this method worked example.
Test: Two-sided Fisher's Exact Test for two independent proportions.
Allocation: Equal, N1 = N2.
Power: Exact binomial enumeration of all possible outcomes under P1 and P2.

Required Sample Size

The result is based on exact enumeration rather than a normal approximation.
Enter the design assumptions and click Calculate Sample Size.

Methodology

Fisher's Exact Test evaluates the association between two binary variables in a 2×2 contingency table. For sample-size planning, the exact power is obtained by enumerating every possible pair of binomial outcomes from the two independent groups under the assumed alternative proportions.

Exact Test Statistic

For a particular table, let x1 and x2 be the numbers of successes in Groups 1 and 2, with total successes m = x1 + x2. Conditional on m, the null distribution is hypergeometric. The this method implementation describes the Fisher statistic as:

T = −ln[ C(n1,x1) C(n2,x2) / C(N,m) ]

For each possible value of m, the conditional rejection region consists of outcomes having a Fisher statistic at least as extreme as the critical value determined by the target α. Equivalently, this implementation identifies the tables whose conditional hypergeometric probability is sufficiently small to fall in the two-sided rejection region.

Power by Binomial Enumeration

Once the exact rejection region has been determined, power is calculated under the alternative proportions P1 and P2 by summing the joint probability of every outcome in that rejection region:

Power = Σ [ C(n1,x1) P1x1 (1−P1)n1−x1 × C(n2,x2) P2x2 (1−P2)n2−x2 ] over the rejection region

The calculator searches for the smallest equal sample size per group for which the exact enumerated power is at least the requested target power. Because Fisher's Exact Test is discrete, the achieved power and actual type-I error can differ from their nominal targets.

Sample Size Interpretation

The reported N1 and N2 are the evaluable sample sizes required in the two groups. The total sample size is N = N1 + N2. This calculator assumes equal allocation, so N1 = N2.

Validation Example

the published Example 2 specifies P1 = 0.54, P2 = 0.44, a two-sided α = 0.05 test, and 90% target power with equal allocation. Exact binomial enumeration gives 546 subjects per group, or 1,092 total, with achieved power of 0.90028 and actual alpha of 0.04207.

Validation target: N1 = 546, N2 = 546, N = 1092; exact power = 0.90028; actual α = 0.04207.

References

Bennett, B. M., & Hsu, P. (1960). On the Power Function of the Exact Test for the 2×2 Contingency Table. Biometrika, 47(3–4), 393–398. doi:10.2307/2333309.

the software, LLC. this method Sample Size Software: Fisher's Exact Test for Two Proportions, Chapter 194. the relevant methodological literature. The documentation describes the exact Fisher power calculation, binomial enumeration, sample-size procedure, and published validation examples.