Sample Size for Estimating a Single Proportion

A guide to calculating the sample size needed to estimate a population proportion (prevalence, rate, or percentage) with desired precision.

Overview

Proportion estimation is one of the most common sample size problems. It arises whenever you need to estimate the percentage of a population with a certain characteristic, for instance, the prevalence of a disease, the proportion of customers satisfied with a service, or the percentage of voters supporting a candidate.

This calculator determines the minimum number of subjects needed to estimate a proportion with a specified level of precision (margin of error) at a given confidence level. The required sample size depends on the expected proportion, the desired precision, and the confidence level.

Sample size is maximised when the expected proportion is 0.5 (maximum uncertainty). As the proportion moves towards 0 or 1, the required sample size decreases.

Worked Example

Scenario: Vaccination Coverage Survey

A public health department wants to estimate the proportion of children aged 12–23 months who have received all recommended vaccinations in a district. Based on previous surveys, the expected coverage is approximately p = 0.70 (70%). They want the estimate to be within ±5 percentage points (absolute precision = 0.05) with 95% confidence.

Using Statulator step-by-step:

1 Open the Sample Size Calculator for Estimating a Single Proportion.

2 Set Confidence Level to 95%.

3 Enter the Expected Proportion as 0.70.

4 Enter the Precision as 0.05.

5 The calculator shows the required sample size: n = 323.

Hand calculation verification:
\[ n = \frac{z_{\alpha/2}^{2} \cdot p(1 - p)}{d^{2}} = \frac{(1.96)^{2} \times 0.70 \times 0.30}{(0.05)^{2}} = \frac{3.8416 \times 0.21}{0.0025} = \frac{0.8067}{0.0025} = 322.7 \]

Rounding up: n = 323.

Adjustments

Finite population correction: If the district has only N = 2,000 children in the target age group:

\[ n_{\text{adj}} = \frac{n}{1 + \frac{n - 1}{N}} = \frac{323}{1 + \frac{322}{2000}} = \frac{323}{1.161} \approx 278 \]

Response rate: If an 80% response rate is anticipated, the sample size should be inflated: 323 / 0.80 = 404 (before FPC), or 278 / 0.80 = 348 (after FPC).

Conservative approach

If the expected proportion is completely unknown, use p = 0.50 for the most conservative (largest) sample size:

\[ n = \frac{(1.96)^{2} \times 0.50 \times 0.50}{(0.05)^{2}} = \frac{0.9604}{0.0025} = 385 \]

Interpretation Guide

Calculator outputs and how to interpret them
OutputInterpretation
Required Sample Size (n) The number of subjects to sample. If the study has a binary outcome (e.g., vaccinated or not), each subject contributes one observation.
Live Interpretation A sentence summarising the result, for example: “A sample of 323 subjects is required to estimate the proportion within ±5% with 95% confidence, assuming an expected proportion of 70%.”
Visualisation Plots the required sample size across a range of expected proportions for several precision values. This is especially useful when the expected proportion is uncertain.
Tabulate A table showing sample sizes for combinations of expected proportion and precision values, useful for study protocols.

Practical tip: The sample size is most sensitive to changes in precision. Doubling precision (e.g., from ±5% to ±10%) reduces the required sample size by a factor of 4. Consider whether a slightly wider margin of error would be acceptable to reduce costs.

Formula

Base Formula (Absolute Precision)
\[ n = \frac{z_{\alpha/2}^{2} \cdot p(1 - p)}{d^{2}} \]

where:

Relative Precision

When precision is expressed as a fraction of the expected proportion (e.g., “within 10% of the true proportion”), the formula becomes:

\[ n = \frac{z_{\alpha/2}^{2} \cdot (1 - p)}{p \cdot \epsilon^{2}} \]

where \( \epsilon \) is the relative precision (e.g., 0.10 for 10% relative margin).

Finite Population Correction
\[ n_{\text{adj}} = \frac{n}{1 + \dfrac{n - 1}{N}} \]
Cluster Sampling Adjustment
\[ n_{\text{cluster}} = n \times [1 + (m - 1) \cdot \rho] \]

Use this adjustment when you sample clusters of individuals (schools, clinics, villages, households) rather than individuals drawn independently from the whole population.

where:

The bracketed term \( [1 + (m - 1) \cdot \rho] \) is called the design effect (DEFF): the factor by which the sample size must be inflated because of clustering. The inflation is needed because people in the same cluster tend to be similar — students in one school share teachers, patients in one clinic share providers, households in one village share an environment — so each additional person from a cluster contributes less new information than an independent draw would. You compensate by recruiting more people overall.

Worked example: a simple random sample calculation requires n = 400. You plan to sample 25 patients per clinic (m = 25), and prior studies suggest \( \rho = 0.02 \) for your outcome:

\[ n_{\text{cluster}} = 400 \times [1 + (25 - 1) \times 0.02] = 400 \times 1.48 = 592 \]

You would need 592 patients in total (across roughly 24 clinics) instead of 400 — a 48% inflation to preserve the same precision.

Edge cases worth knowing: when m = 1 (one person per cluster) the bracket collapses to 1 and there is no inflation — there is nothing for a lone individual to correlate with. When \( \rho = 0 \) the bracket is also 1 — clustering does not matter if cluster members are not actually alike. The inflation grows with both larger clusters and stronger within-cluster correlation.

How to choose \( \rho \) in practice: most researchers borrow \( \rho \) from a published study with a similar outcome and a similar cluster type. Common starting points:

Typical intraclass correlation ranges by outcome type
Outcome typeTypical ρ range
Clinical / biological measurements0.001–0.02
Health-service utilisation0.01–0.05
Behavioural / lifestyle outcomes0.05–0.15
Educational outcomes (within schools)0.10–0.25

If no prior estimate is available, run a sensitivity analysis: compute the cluster-adjusted sample size at \( \rho \) = 0.01, 0.02, and 0.05 and report the most conservative (largest) number.

Response Rate Adjustment
\[ n_{\text{final}} = \frac{n_{\text{adj}}}{R} \]

where \( R \) is the anticipated response rate (e.g., 0.80 for 80%).

Assumptions & Requirements

Normal Approximation to the Binomial — Explained

This assumption is the foundation of the standard sample-size formula for a single proportion. Here is what it is saying and why it matters.

The underlying idea

When you estimate a proportion (say, the fraction of patients who respond to a treatment), the count of “successes” in a sample of size \( n \) follows a binomial distribution. The binomial is discrete — it has a stair-step shape — and exact calculations based on it can be computationally messy. The standard formula sidesteps this by using a normal approximation: it treats the count of successes as if it followed a smooth, bell-shaped normal curve. This is what allows the formula to use familiar critical values such as \( z = 1.96 \) for 95% confidence.

The rule of thumb

The approximation works well only when the binomial distribution is roughly symmetric and bell-shaped. Two conditions must hold simultaneously:

where \( n \) is the sample size and \( p \) is the anticipated proportion.

Why both conditions?

The binomial distribution becomes skewed when \( p \) is very close to 0 or very close to 1. If \( p \) is small, the distribution piles up against zero (you cannot have negative successes) and the bell curve fits poorly; the same problem occurs in mirror image when \( p \) is close to 1. Requiring both \( n \cdot p \) and \( n \cdot (1 - p) \) to be at least 5 ensures you are far enough from either edge for the binomial to look approximately normal.

Quick checks
Normal-approximation checks for example scenarios
Scenarion · pn · (1 − p)Verdict
n = 100, p = 0.303070 Both well above 5 — the normal approximation is appropriate.
n = 50, p = 0.052.547.5 Fails on the success side. The distribution is right-skewed (most samples see 0–5 successes, with a long tail), so the approximation underestimates the needed sample size and confidence intervals will not have the stated coverage.
n = 200, p = 0.012198 Rare-event problem: even at n = 200 you only expect 2 successes. The binomial is heavily skewed and the normal curve fits badly.
What happens if the rule fails?

If the rule of thumb is violated, the formula returns a sample size that is too small: the study will be underpowered, and confidence intervals computed afterwards may not actually contain the true proportion 95% of the time. There are two remedies:

  1. Use an exact method based on the binomial distribution directly, such as the Clopper–Pearson (exact) interval described on the CI for a Single Proportion help page, or an exact sample-size calculation. Exact methods are more conservative but remain valid for any \( n \) and \( p \).
  2. Increase the sample size until both \( n \cdot p \) and \( n \cdot (1 - p) \) clear the threshold. For rare events (small \( p \)) this often means recruiting a very large sample.
A note on the threshold

Textbooks differ on the cutoff: you will see \( \geq 5 \), \( \geq 10 \), and even \( \geq 15 \) depending on the author. The rule of 5 used here is the most common convention, particularly in introductory texts, but it is on the permissive end; stricter rules (\( \geq 10 \)) give better real-world coverage. The same approximation underlies the two-proportion sample-size formula, where the conditions should hold for each group separately.

Textbook Examples

Medicine

A hospital wants to estimate the prevalence of hypertension among adults in a rural district.

Inputs: Expected prevalence p = 0.30, confidence level = 95%, margin of error = 5%, population = 12,000.
Result: n = 312 (after finite-population correction).
Interpretation: Surveying 312 adults will estimate the true hypertension prevalence within ±5 percentage points, 95% of the time.

Education

A university surveys students to estimate the proportion who use the online tutoring platform.

Inputs: Expected proportion p = 0.50 (unknown, conservative), confidence level = 95%, margin of error = 4%.
Result: n = 601.
Interpretation: With no prior estimate, the maximum-variance assumption (p = 0.50) yields the largest necessary sample. Surveying 601 students ensures the estimate is within ±4 pp.

Engineering

A quality control team needs to estimate the defect percentage on a production line producing 5,000 units per month.

Inputs: Expected defect percentage p = 0.03, confidence level = 99%, margin of error = 2%, population = 5,000.
Result: n = 275 (after finite-population correction).
Interpretation: Inspecting 275 units will estimate the true defect percentage within ±2 pp with 99% confidence.

Social Science

A polling firm estimates the proportion of registered voters supporting a policy initiative.

Inputs: Expected support p = 0.45, confidence level = 95%, margin of error = 3%.
Result: n = 1,056.
Interpretation: A random sample of 1,056 voters will produce an estimate within ±3 pp. This is a typical sample size for national opinion polls.

Agriculture

An extension agency estimates the proportion of farms using organic methods in a district with 800 farms.

Inputs: Expected proportion p = 0.15, confidence level = 95%, margin of error = 5%, population = 800, design effect = 1.5 (cluster sampling).
Result: n = 262 (after FPC and cluster correction).
Interpretation: Visiting 262 farms accounts for the clustering within villages and estimates the organic-farming percentage within ±5 pp.

References

  1. Cochran, W. G. (1977). Sampling Techniques (3rd ed.). John Wiley & Sons., Chapter 3: estimation of proportions and percentages.
  2. Lwanga, S. K., & Lemeshow, S. (1991). Sample Size Determination in Health Studies: A Practical Manual. World Health Organization.
  3. Naing, L., Winn, T., & Rusli, B. N. (2006). Practical issues in calculating the sample size for prevalence studies. Archives of Orofacial Sciences, 1, 9–14.
  4. Daniel, W. W., & Cross, C. L. (2013). Biostatistics: A Foundation for Analysis in the Health Sciences (10th ed.). John Wiley & Sons.
  5. Kish, L. (1965). Survey Sampling. John Wiley & Sons., Design effect and cluster sampling correction.