Statistical Calculators › Proportions: One and Two Groups › One-Sample Proportion Test Sample Size
← All Calculators

Proportions: One and Two Groups

One-Sample Proportion Test Sample Size

Calculate the sample size required to test whether a population proportion differs from a specified null value. This calculator uses the large-sample normal-approximation Z-test with the null-proportion variance, matching the standard PASS “Z-Test using S(P0)” approach.

Study Design

Enter the null proportion, anticipated proportion, significance level, and desired power.
P0 is the proportion under H0. P1 is the proportion the study is designed to detect.
Interpretation: For a one-sided test, P1 must lie in the specified direction from P0. For a two-sided test, P1 may be above or below P0.

Sample Size Result

The result is the smallest whole-number sample size obtained by rounding the normal-approximation requirement upward.
Enter the study assumptions and click Calculate Sample Size.

Methodology

This calculator implements the large-sample normal approximation for a one-sample test of a binomial proportion. The null hypothesis is H0: P = P0, while the alternative hypothesis is either two-sided or one-sided. The calculation uses the standard Z-test with the variance evaluated at the null proportion, commonly described as the Z-test using S(P0).

Sample Size Formula

For a two-sided test, the required sample size before rounding is:

n = [ z1−α/2√(P0(1−P0)) + z1−β√(P1(1−P1)) ]² / (P1 − P0

For a one-sided test, z1−α/2 is replaced by z1−α. Here, β = 1 − power. The final sample size is the ceiling of the calculated value because a study cannot enroll a fractional participant.

What the Inputs Mean

Worked Validation Example

The PASS training example uses a null proportion of 0.50, an alternative proportion of 0.60, 90% power, and a two-sided α = 0.05 Z-test using S(P0). PASS reports a required sample size of 259 patients. The same calculation gives an unrounded requirement of approximately 258.506, which rounds upward to 259.

P0 = 0.50  ·  P1 = 0.60  ·  α = 0.05  ·  Power = 0.90  ·  Two-sided

n = 258.506 → 259

Important Note About Exact Tests

This calculator implements the normal-approximation Z-test rather than exact binomial enumeration. PASS provides both approaches for one-proportion tests and notes that the normal approximation can differ from exact calculations, particularly with small samples or proportions near 0 or 1. For those situations, an exact-binomial sample-size calculation may be preferable.

References

NCSS, LLC. (2026). PASS Sample Size Software: Tests for One Proportion. PASS 2026 documentation and training materials. The PASS documentation describes the one-sample proportion test as a test of whether a population proportion differs from a hypothesized value and provides both exact binomial enumeration and normal-approximation methods.

Machin, D., Campbell, M. J., Fayers, P. M., & Pinol, A. P. Y. (1997). Sample Size Tables for Clinical Studies, 2nd ed. Blackwell Science. This is a standard reference for normal-approximation sample-size calculations for binomial proportions.

nQuery by Statsols. nQuery Advanced User Manual. The nQuery documentation includes one-proportion testing/sample-size procedures, including the POT0/POT0x family for one-proportion tests.