Two Arm Binomial Sample Size

Program Code

Both the JavaScript and Server-side versions were coded by CRAB programmer Brent Hostetler. Original code was written in FORTRAN by unidentified SWOG programmer.


Fleiss JL, Tytun A, Ury HK (1980). A simple approximation for calculating sample sizes for comparing independent proportions. Biometrics 36, 343-346.

The formulas are based on the classic critical ratio test with continuity correction. Do not use this program for conditions under which normal approximations do not hold. In the case of equal sample sizes, sample sizes will be identical to the tables in Fleiss: Statistical Methods for Rates and Proportions. For estimates of power, an additional approximation is used. For the case of equal sample sizes, this approximation is accurate for values of N (the number of cases in each group), and D (the absolute value of the difference in proportions to be detected), such that:


For the case of unequal sample sizes, you should consult the paper for conditions under which this approximation is accurate.

Running the Program

Enter the type of calculation to be performed: Either estimate sample size or estimate power. Enter the input items listed below. Some items have initial default values.

Input Items

The user is prompted for values to the following items. For items that have initial default values set, the values are given in parentheses.

Output Items

If sample size estimation is requested, the total sample size is output; otherwise the power is output.

Help Tips