03 · What You Need to Know
Calculating Sample Size for a Population Proportion Step by Step
What Is a Population Proportion?
A population proportion is the fraction of a defined population possessing a specified characteristic. It is conventionally represented by p and ranges from zero to one.
For example, if 30% of eligible students use a learning platform every week, the population proportion is p = 0.30.
A sample proportion, commonly represented by p̂, estimates this unknown population quantity. Under simple random sampling with an appropriate estimator, it can be calculated by dividing the number of sampled individuals with the characteristic by the number of sampled individuals whose status is observed.
Before calculating sample size, define the target population and the characteristic precisely. The proportion of students who have ever used generative AI differs from the proportion who use it weekly.
The measurement definition, reference period, and sampling frame determine what the eventual estimate means.
What Is the Standard Sample-Size Formula?
For a single proportion estimated from independent Bernoulli observations, the theoretical standard error is the square root of p(1 − p)/n.
Multiplying this standard error by a normal critical value gives an approximate confidence-interval half-width. Rearranging the expression produces the familiar sample-size formula.
The formula is often associated with classical survey-sampling approaches discussed by Cochran. Its simplicity makes it useful for initial planning, provided its assumptions and limitations are understood.
How Do You Select the Confidence Level?
The confidence level determines the critical value used to calculate the margin of error.
Common two-sided normal critical values are approximately 1.645 for 90% confidence, 1.960 for 95%, and 2.576 for 99% confidence.
For a fixed expected proportion and margin of error, a higher confidence level requires a larger sample under the conventional formula.
Confidence levels should reflect the inferential purpose and any applicable disciplinary or regulatory requirements. They should not be lowered merely to make recruitment easier.
How Should You Choose the Expected Proportion?
The expected proportion is a planning assumption about the population characteristic before the study begins.
It may be informed by previous probability surveys, administrative records, population registries, or comparable research.
When borrowing an estimate, consider differences in population characteristics, measurement definitions, geographical settings, and reference periods.
An estimate of technology use among postgraduate students, for example, may not apply directly to first-year undergraduates.
If the expected population proportion is unknown, p = 0.50 is commonly used as a maximum-variance assumption for the conventional absolute-precision formula.
That choice is conservative in a specific mathematical sense. It is not evidence that the characteristic actually occurs in half the population.
Why Does p = 0.50 Produce the Largest Sample Size?
The binomial variance term p(1 − p) reaches its maximum of 0.25 at p = 0.50.
Consequently, when the confidence level and absolute margin of error are fixed, the conventional formula produces its largest initial sample-size requirement at 50% prevalence.
| Expected proportion |
p(1 − p) |
Required sample at 95% confidence and ±5 percentage points |
| 10% |
0.09 |
139 |
| 20% |
0.16 |
246 |
| 30% |
0.21 |
323 |
| 40% |
0.24 |
369 |
| 50% |
0.25 |
385 |
The table uses the same normal approximation for every row, with results rounded upward.
Expected proportions of 20% and 80% produce the same binomial variance, as do 10% and 90%. The relationship is symmetric around 50%.
The effect of expected prevalence on precision-based sample size should nevertheless be interpreted alongside the chosen precision criterion, particularly when the characteristic is uncommon.
How Do You Choose the Margin of Error?
The margin of error specifies the desired absolute uncertainty around the estimated proportion under the planned symmetric normal approximation.
A margin of error of 0.05 corresponds to five percentage points, not necessarily 5% of the expected proportion.
For example, if the expected proportion is 30%, an absolute margin of five percentage points corresponds to an illustrative planning interval from 25% to 35%.
A relative margin of 5% of the anticipated 30% proportion would instead equal 1.5 percentage points.
The distinction is important because relative precision can require much larger samples than a fixed absolute margin.
Researchers should establish how precise the population proportion needs to be according to the intended interpretation or decision, rather than automatically accepting a calculator's default.
How Does Margin of Error Affect the Required Sample?
Because the target margin of error appears in the denominator as E2, smaller margins require substantially larger samples.
For expected prevalence of 30% at 95% confidence, the following calculations illustrate the relationship.
| Absolute margin of error |
Target total interval width |
Approximate required sample |
| ±5 percentage points |
10 percentage points |
323 |
| ±4 percentage points |
8 percentage points |
505 |
| ±3 percentage points |
6 percentage points |
897 |
| ±2 percentage points |
4 percentage points |
2,017 |
These results are rounded upward from the normal-approximation formula. Halving the margin of error approximately quadruples the sample-size requirement.
Researchers should therefore justify the value of obtaining additional precision relative to its recruitment and operational costs.
What If the Expected Proportion Is Very Small?
Rare proportions require particular attention because the normal approximation may perform poorly when the expected number of observed cases is small.
Suppose the expected prevalence is 1%. Using an absolute margin of error of five percentage points produces an initial sample-size calculation of approximately 16 observations.
That result is mathematically consistent with the formula but generally unsuitable for meaningful estimation of a rare condition. With only 16 observations, the expected number of cases would be 0.16.
A narrower absolute margin, a relative-precision target, or a requirement for sufficient expected cases may be more appropriate.
Researchers should also use a confidence-interval procedure suitable for rare proportions rather than assume that the simple Wald interval has reliable coverage.
Watch Out
A small sample size calculated for rare prevalence using a broad absolute margin of error may be statistically uninformative. Check expected case counts and the operating characteristics of the intended confidence-interval procedure before accepting the result.
Should You Use the Wilson Interval or an Exact Binomial Interval?
The conventional formula is based on a normal approximation related to the Wald confidence interval. However, the Wald interval can have poor coverage, especially when sample sizes are small or the true proportion is near zero or one.
Wilson's score interval provides an alternative with generally more reliable coverage properties across many binomial settings. Exact binomial intervals offer another approach, although their coverage is often conservative and their widths can be larger.
Brown, Cai, and DasGupta (2001) examine the performance of several binomial confidence-interval procedures and demonstrate why the Wald method should not be treated as universally adequate.
When the study requires strict precision or involves uncommon characteristics, sample size should ideally be determined using the intended interval procedure.
For a Wilson interval, researchers may evaluate expected width, maximum width, or the probability of meeting a specified width. These are different planning criteria and may produce different requirements.
How Do You Adjust for a Finite Population?
When sampling without replacement from a known finite population, a finite population correction may reduce the required sample size.
A common approximation adjusts the initial sample-size requirement as follows:
The adjustment is most consequential when the sample represents a substantial fraction of the population. For a very large population, the corrected requirement approaches the initial sample-size calculation.
How Do You Account for Cluster Sampling?
When participants are recruited through schools, classrooms, communities, or other clusters, observations within the same cluster may be correlated.
Such correlation can increase the variance of the estimated proportion relative to independent sampling.
For approximately equal cluster sizes, a commonly used design-effect approximation is DEFF = 1 + (m − 1)ρ, where m represents the number of observations per cluster and ρ is the intracluster correlation.
For example, with m = 20 and ρ = 0.05, the approximate design effect is 1.95.
If the independent-sampling requirement is 385 observations, a simple illustrative adjustment gives 385 × 1.95 = 750.75, rounded upward to 751 observations.
This is not a complete cluster-sampling design calculation. The number of clusters, variation in cluster size, weighting, and planned analysis may materially change the requirement.
How Do You Adjust for Nonresponse?
The calculated sample size usually refers to completed, usable observations. Researchers must separately determine how many eligible individuals to approach.
If r is the anticipated proportion providing usable responses, a simple recruitment adjustment is:
What If You Need Estimates for Several Subgroups?
A sample adequate for estimating the overall population proportion may be insufficient for estimating separate proportions within demographic, geographical, or institutional subgroups.
Suppose a university survey includes students from five academic programs. If each program requires its own prevalence estimate with a specified margin of error, the sample-size requirements must be considered within those programs.
Simply recruiting 385 students overall does not guarantee that each program will contain enough observations for useful precision.
Disproportionate stratified sampling may improve subgroup precision, but the overall population estimate may then require appropriate weighting.
Researchers should distinguish the sample needed for estimating a single overall proportion from the sample needed to compare proportions between groups. The latter is a different statistical problem.
Does a Larger Sample Guarantee an Accurate Population Proportion?
No. Increasing sample size generally reduces random sampling uncertainty under an appropriate design, but it does not automatically correct systematic errors.
A voluntary survey of students who are particularly interested in educational technology may overestimate AI use, even when thousands participate.
Similarly, ambiguous questions or inconsistent case definitions can distort the measured proportion.
Probability-based margins of error should not be presented without qualification for samples selected through mechanisms that do not support the required design-based inference.
The sampling process, measurement validity, and nonresponse mechanisms remain as important as the numerical sample-size calculation.
Should Sample Size Be Based on Precision or Statistical Power?
When the primary objective is to estimate one population proportion, precision-based sample-size planning is often the most direct approach.
If the objective is instead to test whether a proportion exceeds a threshold or differs between groups, a hypothesis-testing calculation may be more appropriate.
The target estimand and intended analysis should be established before choosing the sample-size formula.
When prevalence or other parameters are uncertain, a sample-size sensitivity analysis can reveal how the required sample changes across credible assumptions.