Minimum Sample Size Formula: How to Calculate It

Formulas & functions · Updated November 3, 2026

Minimum Sample Size Formula: How to Calculate It

The minimum sample size depends on what you are estimating or testing. For a proportion in a large population, a common starting formula is n = z²p(1 − p) / E²; for a mean, it is n = (zσ / E)². Choose the formula that matches the study, specify the confidence level and acceptable error or power, then round the result up.

What a Minimum Sample Size Means

Sample size, usually written as n, is the number of observations needed for a study. The word minimum matters: it describes the smallest sample that meets stated statistical assumptions and targets, not a universally adequate number for every project. A survey estimating a percentage, an experiment comparing treatments, and a study estimating an average answer different questions and can require different sample-size calculations.

A larger sample generally produces a more precise estimate, but the benefit gets smaller as the sample grows. It also costs more to recruit, measure, and analyze. The purpose of a calculation is to balance precision or ability to detect an effect against time and resources, while making the assumptions visible.

Formula for Estimating a Proportion

For a simple random sample from a large population, use n₀ = z²p(1 − p) / E². Here, p is the anticipated proportion, E is the desired margin of error expressed as a proportion, and z is the standard-normal value for the chosen confidence level. This formula is commonly used for survey questions with a yes/no or other two-outcome response.

  • Confidence level: Common two-sided choices are 90%, 95%, and 99%, with approximate z values of 1.645, 1.96, and 2.576.
  • Anticipated proportion: Use a credible prior estimate or pilot study when available. If it is unknown, use 0.50; this gives the largest required sample for a fixed confidence level and margin of error.
  • Margin of error: An error of five percentage points is E = 0.05, not 5. The target is an absolute error, not a percentage of the estimated value.

Example: Suppose a poll seeks a 95% confidence interval with a margin of error of ±5 percentage points, and no prior estimate of the proportion is available. Substituting z = 1.96, p = 0.50, and E = 0.05 gives n₀ = 1.96² × 0.50 × 0.50 / 0.05² = 384.16. Round up, so the starting target is 385 completed responses. The familiar claim that a poll needs about 385 responses is therefore conditional on these choices and assumptions; it is not a rule for every survey.

Adjusting for a Finite Population

The large-population formula can be conservative when the population is small and known, and the sample is drawn without replacement. Apply a finite population correction using n = n₀ / [1 + (n₀ − 1) / N], where N is the population size and n₀ is the uncorrected result. An equivalent form is n = Nz²p(1 − p) / [E²(N − 1) + z²p(1 − p)].

For example, with the preceding inputs and a population of 1,000 people, the correction gives 384.16 / [1 + 383.16 / 1,000] ≈ 277.7, so the target becomes 278 completed responses. The reduction reflects that sampling a substantial fraction of a finite population provides more information than sampling the same number from a very large population. Do not use this correction just because a population has a known size: the sampling design must support it, and the population definition must be relevant to the question.

Formula for Estimating a Mean

When the outcome is numerical and the goal is to estimate a population mean, a common planning formula is n = (zσ / E)². Here, σ is the population standard deviation, and E is the desired margin of error in the same units as the outcome. For example, if the target is to estimate an average waiting time within two minutes, E is 2 minutes and σ must also be measured in minutes.

The standard deviation may come from earlier comparable research, administrative data, or a pilot study. If it is unknown, a pilot can help estimate it, but a small pilot estimate is uncertain. The formula also assumes a suitable sampling design and, for its usual interpretation, a sufficiently well-behaved sampling distribution of the mean. For small samples from strongly skewed populations, a normal-based interval may be unreliable.

Because σ is usually estimated rather than known, analysts often use a t distribution for the final confidence interval. Its critical value depends on the degrees of freedom, which depend on n, so the planning calculation may be iterative: choose a trial n, obtain the corresponding t value, recalculate, and repeat until the target is stable. For large samples, the t critical value approaches the z value. If the outcome has a natural upper or lower bound, the normal approximation may also behave poorly near that boundary.

Sample Size for a Hypothesis Test

When the question is whether groups differ, a precision formula alone is not enough. Plan around the smallest effect that would matter in practice, the significance level, and the desired statistical power. Power is the probability of detecting an effect of the specified size if that effect is real; a common planning target is 80% or 90%. The significance level, often 5%, controls the long-run chance of a false positive under the test’s assumptions.

For a simple comparison of two independent group means with equal group sizes, a normal-approximation formula is n per group ≈ 2(z₁₋α/₂ + z₁₋β)²σ² / Δ². Here, Δ is the difference to detect, σ is the common within-group standard deviation, α is the two-sided significance level, and 1 − β is power. For example, with α = 0.05, 80% power, and a target difference of half a standard deviation (Δ/σ = 0.5), the approximation gives 2(1.96 + 0.84)² / 0.5² ≈ 62.72, or 63 participants per group. This is a planning approximation, not a substitute for a method appropriate to the actual test, data, and design.

Tests of proportions, paired observations, survival outcomes, repeated measurements, and multiple primary outcomes each have their own assumptions and calculations. A two-group trial also needs enough participants in each group, not just enough overall. If the study is intended to detect a range of possible effects, calculate the sample size for a clearly justified primary outcome and effect size rather than choosing an arbitrary total.

How to Choose the Inputs

Before calculating, translate the research question into a statistical target. A useful planning sequence is:

  1. Define the target population, outcome, and sampling unit. A respondent, household, clinic, and measurement occasion are not interchangeable units.
  2. Decide whether the aim is to estimate a proportion or mean, compare groups, or test another specific relationship.
  3. Set a meaningful precision target or a smallest effect worth detecting. Use the units readers and decision-makers can interpret.
  4. Select a confidence level or test significance level and power appropriate to the consequences of uncertainty and false conclusions.
  5. Find a defensible estimate of the proportion, standard deviation, event rate, or other required nuisance parameter. Document its source and uncertainty.
  6. Account for the sampling design, expected missing data, and practical recruitment limits; then round the final sample target up.

These choices are connected. Halving the margin of error in a proportion estimate approximately quadruples the required sample because E is squared in the denominator. Moving from 95% to 99% confidence also increases the requirement because the z value is larger. For a test, detecting a smaller difference requires more observations, while greater power generally requires a larger sample. These relationships help explain why apparently modest changes in the study goal can substantially change the answer.

Nonresponse, Clustering, and Other Adjustments

The calculated n usually means usable observations, not invitations or people approached. If an estimated 80% of recruited people will provide complete data, divide the desired number of completed responses by 0.80. For the 385-response example, 385 / 0.80 = 481.25, so invite or recruit at least 482 people, subject to how the response-rate estimate and rounding are handled. If some responses will be unusable, account for that expected loss as well.

Simple formulas assume observations that contribute independent information. In a cluster sample, people within the same school, clinic, worksite, or household may be more alike than people selected independently. A design effect greater than one is commonly used to inflate the simple-random-sample requirement: adjusted sample size = initial sample size × design effect. The correct design effect depends on the clustering and analysis; it should not be guessed without justification. Unequal weights can also reduce effective sample size.

Other reasons a real study may need a larger or different target include subgroup estimates, multiple comparisons, anticipated attrition over time, unequal group allocation, and eligibility screening. These are not all handled by adding the same percentage. For example, a study powered for an overall estimate may still be too small to estimate each subgroup precisely. State whether the target refers to total participants, participants per group, or completed measurements at a particular follow-up.

Common Misconceptions and Practical Limits

A large sample does not automatically make results representative. A biased sampling frame, low or differential response, poorly worded questions, measurement error, or protocol deviations can produce misleading results even when n is large. The usual margin-of-error formula describes sampling uncertainty under specified assumptions; it does not measure every source of error in a survey or experiment.

There is also no universal rule that 30 observations are always enough. That number is sometimes associated with rough normal-approximation guidance, but adequacy depends on the outcome distribution, design, parameter being estimated, and effect or precision target. Similarly, a census that contacts everyone in a defined population can still have nonresponse and measurement error, and it may not answer a question about a broader population.

For qualitative interviews, the purpose is usually depth and range of insight rather than estimating a population percentage with a specified margin of error. The proportion formula therefore does not determine an interview count. Researchers may plan based on the research scope, participant diversity, analytic approach, and whether further interviews are adding useful information, while explaining how the sample was chosen.

Frequently Asked Questions

What is the minimum sample size formula for a survey?
For estimating a proportion in a large population with a simple random sample, use n = z²p(1 − p) / E². Specify confidence level, anticipated proportion, and margin of error. Use p = 0.50 when no credible estimate is available, and consider a finite population correction if the population is small and sampled without replacement.

Is 30 a statistically significant sample size?
No fixed sample count makes a result statistically significant. Significance depends on the data, the effect, variability, analysis, and chosen test. Thirty may be adequate for some purposes and inadequate for others; calculate the needed n from the study’s precision or power goal.

How many responses do I need for a 5% margin of error?
At 95% confidence, assuming a large population, a simple random sample, and an unknown proportion set to 0.50, the formula gives 384.16, which rounds up to 385 completed responses. A small finite population can reduce that target; design effects and nonresponse can increase the number to recruit.

Does a larger population always require a larger sample?
Not once the population is large relative to the sample. For estimating a proportion at fixed confidence and margin of error, the uncorrected requirement does not include population size. Population size matters more when the population is small enough for the finite population correction to have a meaningful effect.

Should I round the calculated sample size up or down?
Round up to the next whole observation. Rounding down can leave the planned sample just short of the chosen precision or power target. If the calculation gives 384.16, plan for at least 385 usable observations, then increase recruitment if incomplete data are expected.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.