Sample Size to Compare Two Proportions (WHO Lwanga-Lemeshow)

Sample size per group to compare two proportions, by a hypothesis test or by the precision of their difference.

Open the calculator → Runs in your browser. Data leaves only if you deliberately send a problem report from the interactive tool.

Example

Hypothesis test or estimate of the difference
Test whether the two proportions differ
First group
5 %
Second group
15 %
Significance level
5 %
Power
90 %
One- or two-sided test
One-sided

Result: 153 per group, 306 in all: to detect 5% against 15% with a one-sided test at 5% significance and 90% power.

The tool opens with these values already filled in. Replace them with your own.

What you enter

  • Hypothesis test or estimate of the difference
  • First group: anticipated proportion
  • Second group: anticipated proportion
  • Significance level (test mode)
  • Power (test mode)
  • One- or two-sided test (test mode)
  • Confidence level (difference mode, %)
  • Absolute precision of the difference in percentage points (difference mode)
  • Design effect (optional; blank is 1, simple random sampling)
How this is calculated

Citation

Lwanga SK, Lemeshow S. Sample size determination in health studies: a practical manual. World Health Organization, Geneva, 1991 (ISBN 92 4 154405 8): Tables 4 (difference with absolute precision) and 5 (hypothesis test, pooled under the null, unpooled under the alternative), Examples 9 to 12. Read the source ↗

A reference and educational tool. Not medical, legal, or financial advice, and not a substitute for clinician judgment.

Browse all tools

Built by Clay Good. Source on GitHub.