One-sample test of a proportion

Sample size for one proportion vs a reference

How many participants to show a rate differs from a benchmark — a complication rate against a national figure, adherence against an audit target.

Uses the standard normal approximation, which is accurate at typical sample sizes. A planning estimate, not a substitute for a statistician.

Method & formula

This uses the standard normal-approximation formula with the null variance under the reference proportion and the alternative variance under the expected proportion: n = (z1−α/2·√(p₀(1−p₀)) + z1−β·√(p₁(1−p₁)))² / (p₁−p₀)². It is accurate when n·p and n·(1−p) are comfortably above 5; for very small samples or proportions near 0 or 1, an exact binomial calculation is the better tool.

Source: Fleiss JL, Levin B, Paik MC. Statistical Methods for Rates and Proportions, 3rd ed. Wiley, 2003.

Inputs, explained

Reference proportion
The fixed benchmark you are testing against (a national rate, a guideline target), as a decimal.
Expected proportion
The rate you actually expect to observe in your group. The distance between the two is what drives the sample size.

A sample size is one line of a statistical plan. Ask Mallard turns a plain-language description of your study into the full plan — design, recommended analysis, power, causal diagram, methods paragraph, the conditions the design depends on, and runnable R, Python, SAS, and Stata code. It starts with a free design brief: the design it recommends, what it estimates, and the alternatives worth considering — no account, no card.

Plan my study free →

Related calculators: comparing two proportions · one mean vs a reference value · logistic regression (events per variable) · all calculators