Skip to main content

    Method document

    Sample size to estimate a prevalence

    How many participants are needed to estimate a single proportion, such as the prevalence of a condition, so that its confidence interval extends no more than a chosen margin either side of the estimate. Covers finite populations, cluster sampling, stratified sampling and non-response.

    Engine version 1.0.0 · Reviewed 8 October 2026

    See also: Sample size for a stratified survey

    https://statwisely.com/methods/precision-proportion/

    When to use it

    • A cross-sectional survey whose main aim is to estimate how common something is: a disease, a risk factor, vaccination coverage, knowledge or a practice.
    • An objective stated as a precision, for example “to estimate the prevalence to within ±5 percentage points”.

    Not for

    • Comparing two groups. Use the difference between two proportions, or a powered test under “Detect an effect”.
    • Showing that a prevalence is above or below a threshold. That is a one-proportion test, planned for power rather than precision.

    Notation

    nn
    Sample size under simple random sampling
    pp
    Expected proportion (prevalence)
    EE
    Margin of error: the half-width of the confidence interval, on the proportion scale
    z1−α/2z_{1-\alpha/2}
    Standard normal quantile for confidence 1 − α (1.960 for 95%)
    NN
    Population size
    DE\mathrm{DE}
    Design effect
    ρ\rho
    Intracluster correlation coefficient (ICC)
    mm
    Usable observations per cluster
    kk
    Number of clusters
    CV\mathrm{CV}
    Coefficient of variation of cluster size
    CC
    Clusters in the population
    WhW_h
    Population share of stratum h
    aha_h
    Sample share of stratum h, set by the allocation
    L, UL,\ U
    Low and high ends of the range of cluster values
    qq
    Non-response rate

    Formulas

    Simple random sampling

    n=⌈z1−α/22  p (1−p)E2⌉n = \left\lceil \frac{z_{1-\alpha/2}^{2}\; p\,(1-p)}{E^{2}} \right\rceil

    The normal-approximation (Wald) interval for a proportion, solved for n [1, 3]. The result is rounded up, since a smaller sample would fall short of the margin.

    Finite population correction

    n′=⌈n1+(n−1)/N⌉n' = \left\lceil \frac{n}{1 + (n - 1)/N} \right\rceil

    Applied when a population size is given [1]. It matters only when the sample is a sizeable share of the population, and is not offered with cluster sampling.

    Design effect from an ICC

    DE=1+(m−1) ρ\mathrm{DE} = 1 + (m - 1)\,\rho

    For clusters of equal size [2]. A design effect can also be entered directly, in which case no ICC is used.

    Unequal cluster sizes

    DE=1+[(CV2+1) m−1]ρ,CV=SD⁡(sj)sˉ\mathrm{DE} = 1 + \left[(\mathrm{CV}^{2} + 1)\,m - 1\right]\rho, \qquad \mathrm{CV} = \frac{\operatorname{SD}(s_j)}{\bar{s}}

    When each cluster is given its own share s_j of the sample, the CV of those shares enlarges the design effect [6]. With a design effect entered directly the shares only divide the sample, since a measured design effect already reflects its survey’s cluster sizes.

    Number of clusters for a chosen cluster size

    k=max⁡ ⁣(2, ⌈n⋅DEm⌉),nclustered=k mk = \max\!\left(2,\ \left\lceil \frac{n \cdot \mathrm{DE}}{m} \right\rceil\right), \qquad n_{\text{clustered}} = k\,m

    The requirement is rounded up to whole clusters, so the total can exceed n × DE slightly. At least two clusters are needed to estimate between-cluster variation.

    Cluster size for a fixed number of clusters

    m=⌈n (1−ρ)k−n ρ⌉,k>n ρm = \left\lceil \frac{n\,(1-\rho)}{k - n\,\rho} \right\rceil, \qquad k > n\,\rho

    Solving k·m = n·DE for m. Below that number of clusters no cluster size reaches the margin, because each extra person per cluster adds less and less information; the calculator reports the minimum number of clusters instead.

    ICC from a range across clusters

    ρ≈[(U−L)/4]2p (1−p)\rho \approx \frac{\left[(U - L)/4\right]^{2}}{p\,(1-p)}

    When no ICC is available: the range within which most clusters’ values are expected to fall is taken as about four between-cluster standard deviations, and the ICC is their share of the total variance p(1 − p). An elicitation aid, not a measurement.

    Sampling a share of a finite set of clusters

    DE=1+(m−1) ρ−kC m ρ,k=⌈n [1+(m−1)ρ]m (1+nρ/C)⌉\mathrm{DE} = 1 + (m - 1)\,\rho - \frac{k}{C}\, m\,\rho, \qquad k = \left\lceil \frac{n\,[1 + (m-1)\rho]}{m\,(1 + n\rho/C)} \right\rceil

    Optional. When the clusters sampled are a sizeable share of the C there are, the between-cluster part of the variance shrinks by 1 − k/C, and the number of clusters has the closed form shown [1]. People within a cluster are taken as a small share of it, the cautious side. The people-level correction does not apply to a cluster sample.

    Stratified sampling

    nstratified=⌈n DEw DE⌉,DEw=∑hWh2ah,nh=⌈ah nstratified⌉n_{\text{stratified}} = \left\lceil n\,\mathrm{DE}_w\,\mathrm{DE} \right\rceil, \qquad \mathrm{DE}_w = \sum_h \frac{W_h^{2}}{a_h}, \qquad n_h = \lceil a_h\, n_{\text{stratified}} \rceil

    Optional. When every stratum (region, urban or rural area) is sampled, the strata add no design effect of their own; an allocation away from the population shares weights respondents unequally, which costs the combined estimate Kish’s weighting effect DE_w, 1 for proportional allocation [2]. It multiplies the cluster design effect when clusters are sampled within the strata. Every stratum can instead be sized for its own margin, and finite strata carry their own corrections: see “Sample size for a stratified survey” for the allocations, those options and worked examples.

    Few clusters

    n  ←  n(tk−1, 1−α/2z1−α/2)2n \;\leftarrow\; n \left(\frac{t_{k-1,\,1-\alpha/2}}{z_{1-\alpha/2}}\right)^{2}

    Optional. With few clusters the interval is built on k − 1 degrees of freedom, so the normal critical value is replaced by t. Because k depends on n, this is iterated until it settles.

    Non-response

    napproach=⌈n1−q⌉n_{\text{approach}} = \left\lceil \frac{n}{1 - q} \right\rceil

    The number to approach so that n respond. Applied last, after any clustering.

    Parameters

    Confidence level1−α1-\alpha

    Values: 90%, 95% or 99%

    95% is the convention in health research. A higher level widens the interval, so the same margin needs a larger sample.

    Margin of errorEE

    Values: Above 0 and below 1 on the proportion scale; 0.05 means ±5 percentage points

    An absolute margin. ±5 points suits prevalences between about 20% and 80%. For a prevalence below 10%, a ±5-point margin can be as wide as the prevalence itself; use about half the expected prevalence or less, and likewise half of 1 − p above 90% [4].

    Expected prevalencepp

    Values: Between 0 and 1

    From a previous survey of a similar population, a pilot study or the literature. When nothing is known, 0.5 gives the largest sample, so the margin is met whatever the true prevalence.

    Population sizeNNOptional

    Values: A whole number of at least 2

    Leave empty for a large population. It matters only when the sample would be more than about 5% of the population. Not available with cluster sampling.

    Expected non-response rateqqOptional

    Values: 0% up to, but not including, 100%

    The share of people approached who will not take part; use the response rate of a comparable study. Approaching more people restores the number of respondents, not their representativeness: if non-responders differ, the estimate can still be biased.

    Intracluster correlation (ICC)ρ\rhoOptional

    Values: From 0 to 1

    The share of the outcome’s variation that lies between clusters. Published ICCs for health outcomes in primary-care and community clusters are mostly small, often below 0.05 [8], but depend on the outcome and the kind of cluster; prefer an estimate from a comparable study.

    Range of values across clustersL, UL,\ UOptional

    Values: Two values in the outcome’s units, the first below the second

    An alternative to the ICC: the range within which you expect most clusters’ values to fall. It is converted to an ICC by the formula above.

    Design effectDE\mathrm{DE}Optional

    Values: Above 0; usually between 1 and 3

    An alternative to the ICC, when a previous survey of the same design reports its design effect. Cluster surveys of immunization coverage have traditionally assumed a design effect of 2 [9].

    Observations per clustermmOptional

    Values: A whole number of at least 1

    Usable responses per cluster. Larger clusters are cheaper to reach, but when the ICC is above zero each additional person in a cluster adds less information.

    Number of clusterskkOptional

    Values: A whole number of at least 2

    Instead of a cluster size, when the clusters are fixed: the emirates of a country, the schools of a district. The calculator then finds the cluster size, or reports how many clusters the margin needs.

    Share of the sample for each clustersjs_jOptional

    Values: One positive value per cluster, on any scale

    When clusters will contribute unequally, for example in proportion to their population. With an ICC, unequal shares enlarge the design effect [6].

    Population share of each stratumWhW_hOptional

    Values: Positive, adding to 100%, for at least two strata

    Tick “Stratified sampling” to use it. From a census or sampling frame.

    Allocation across strataaha_hOptional

    Values: Proportional, square root, equal, Neyman or custom

    Proportional costs nothing; move towards equal when small strata must be reported on.

    What the margin is forgoal\text{goal}Optional

    Values: The combined estimate, or every stratum on its own

    Every stratum on its own usually costs far more people.

    Clusters in the populationCCOptional

    Values: A whole number, at least the clusters sampled

    Leave empty when the clusters sampled are a small share of all there are. Give it when they are not, say 20 of 40 districts; the design effect then falls.

    Correction for few clusterstk−1t_{k-1}Optional

    Values: On or off

    Uses t on k − 1 degrees of freedom instead of the normal distribution. Worth applying when there are few clusters, roughly fewer than 30.

    Assumptions

    • Participants, or clusters, are selected at random, and respond independently apart from the clustering specified.
    • The normal approximation holds: the expected numbers with and without the outcome, n·p and n·(1 − p), are both comfortably above 10. Near 0% or 100% the Wald interval can fall short of its stated confidence, so analyse with a Wilson or exact interval [5].
    • The margin is absolute and assumes the expected prevalence. If the true prevalence is nearer 50% than assumed, the achieved margin will be wider.
    • With cluster sampling: one ICC applies to every cluster; clusters are of equal size unless shares are given; the sampled clusters are a small fraction of all clusters; and the analysis accounts for the clustering, for example with survey-design standard errors [2, 7].
    • Non-response is unrelated to the outcome.

    Worked examples

    A prevalence survey

    Expected prevalence 50%, 95% confidence, margin ±5 percentage points: n = 1.96² × 0.5 × 0.5 / 0.05² = 384.15, rounded up to 385.

    Sample size: 385

    Protocol statement

    To estimate a prevalence with 95% confidence and a margin of error of ±5 percentage points, assuming an expected prevalence of 50%, the required sample size is 385 participants. Calculated with StatWisely (statwisely.com) using: n = z_(1-α/2)² × p(1-p) / E². These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    Allowing for non-response

    The same survey, expecting 10% of those approached not to take part: 385 / (1 − 0.10) = 427.8, so 428 people are approached for 385 to respond.

    Needed for analysis: 385 · To approach: 428

    Open this example in the calculator

    A small population

    The same survey in a population of 5000: 385 / (1 + 384 / 5000) = 357.5, rounded up to 358.

    Sample size: 358

    Open this example in the calculator

    Cluster sampling with a known design effect

    Households are sampled in clusters of 110, and a previous survey of the same design reported a design effect of 2: 385 × 2 = 770, in 7 clusters of 110.

    Sample size: 770

    Protocol statement

    To estimate a prevalence with 95% confidence and a margin of error of ±5 percentage points, assuming an expected prevalence of 50%, 385 participants would be required under simple random sampling. Allowing for an assumed design effect of 2 for cluster sampling, the required sample size is 770 participants, in 7 clusters of 110. This assumes clusters of equal size, with a negligible sampling fraction. Calculated with StatWisely (statwisely.com) using: n = z_(1-α/2)² × p(1-p) / E²; clustered: n x DE, DE assumed. These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    Cluster sampling with an ICC

    ICC 0.02 and 20 per cluster: DE = 1 + (20 − 1) × 0.02 = 1.38. Then 385 × 1.38 = 531.3, so ⌈531.3 / 20⌉ = 27 clusters and 540 participants. Rounding up to whole clusters adds a few beyond the minimum.

    Sample size: 540

    Open this example in the calculator

    Most of a small set of clusters

    The same design, but there are only 40 clusters to choose from: k = ⌈531.3 / (20 × (1 + 385 × 0.02 / 40))⌉ = ⌈22.28⌉ = 23, and sampling 23 of 40 lowers the design effect to 1.38 − (23/40) × 20 × 0.02 = 1.15: 460 participants instead of 540.

    Sample size: 460

    Open this example in the calculator

    A fixed number of clusters

    Only 30 clusters are available and the ICC is 0.01: m = ⌈385 × 0.99 / (30 − 385 × 0.01)⌉ = ⌈14.58⌉ = 15 per cluster, 450 in total, with a design effect of 1.14.

    Sample size: 450

    Open this example in the calculator

    Validation

    • Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
    • An independent implementation in R recomputes this procedure, with and without cluster sampling, every night and before each production release, and the results are compared with the engine’s.
    • The basic result agrees with the closed form: 1.96² × 0.25 / 0.05² = 384.15, rounded up to 385. Tables that round to the nearest whole number show 384; StatWisely rounds up, because 384 falls just short of the requested margin. In R, ceiling(qnorm(0.975)^2 * 0.5 * 0.5 / 0.05^2) returns 385.

    How to cite

    StatWisely. Sample size to estimate a prevalence. Method document, engine version 1.0.0, reviewed 2026-10-08. https://statwisely.com/methods/precision-proportion/

    Cite the original references for the formulas your design uses as well.

    References

    1. 1.Cochran WG. Sampling Techniques. 3rd ed. New York: John Wiley & Sons; 1977.
    2. 2.Kish L. Survey Sampling. New York: John Wiley & Sons; 1965.
    3. 3.Lwanga SK, Lemeshow S. Sample Size Determination in Health Studies: A Practical Manual. Geneva: World Health Organization; 1991.
    4. 4.Naing L, Winn T, Rusli BN. Practical issues in calculating the sample size for prevalence studies. Archives of Orofacial Sciences. 2006;1:9–14.
    5. 5.Brown LD, Cai TT, DasGupta A. Interval estimation for a binomial proportion. Statistical Science. 2001;16(2):101–133. doi:10.1214/ss/1009213286
    6. 6.Eldridge SM, Ashby D, Kerry S. Sample size for cluster randomized trials: effect of coefficient of variation of cluster size and analysis method. International Journal of Epidemiology. 2006;35(5):1292–1300. doi:10.1093/ije/dyl129
    7. 7.Donner A, Klar N. Design and Analysis of Cluster Randomization Trials in Health Research. London: Arnold; 2000.
    8. 8.Adams G, Gulliford MC, Ukoumunne OC, Eldridge S, Chinn S, Campbell MJ. Patterns of intra-cluster correlation from primary care research to inform study design and analysis. Journal of Clinical Epidemiology. 2004;57(8):785–794. doi:10.1016/j.jclinepi.2003.12.013
    9. 9.Bennett S, Woods T, Liyanage WM, Smith DL. A simplified general method for cluster-sample surveys of health in developing countries. World Health Statistics Quarterly. 1991;44(3):98–106.