Skip to content
Dilawar Hussain

Sample size calculator

Estimate the sample needed for a proportion or a mean at 90, 95, or 99 percent confidence, with an optional finite population correction.

Browser compute / no account / no upload

Estimate the sample size for a proportion or a mean at a chosen confidence level and margin of error. Add a population size to apply the finite population correction.

Decimal form: 0.05 for ±5 percentage points.

Use 0.5 when you do not know the proportion; it gives the largest sample.

Leave blank for an unlimited population. Enter a whole number to apply the finite population correction.

Method

  • For a proportion, n0 = z^2 p(1-p) / e^2. For a mean, n0 = (z sigma / e)^2. The result is rounded up to the next whole respondent.
  • When the population is finite, the correction n = n0 / (1 + (n0 - 1)/N) reduces the required sample. Leave the population blank for an unlimited population.
  • The estimate assumes a simple random sample, a normal approximation, and no design effect. Multiply by the design effect for a cluster sample and divide by the expected response rate.

Reference: NIST/SEMATECH e-Handbook: Sample Sizes

A sample size calculation turns a precision target into a number of observations. The inputs are the confidence level, the margin of error, and a planning value for the proportion or standard deviation. This calculator returns the minimum sample before nonresponse and design effects, which are usually added afterward.

Formulas

The first formula estimates a proportion $p$ with margin $e$. The second estimates a mean with standard deviation $\sigma$ and margin $e$. The critical value $z$ comes from the normal distribution and depends on the confidence level.
Two-sided critical values for the common confidence levels.
ConfidencezTypical use
90%1.645Exploratory work
95%1.960Most survey reporting
99%2.576High-stakes estimates

Worked example: a survey proportion

Example 1

95% confidence, 5 point margin

Problem

How many respondents are needed to estimate a proportion within 5 percentage points at 95 percent confidence when no prior estimate is available?

Solution

  1. Use for the largest required sample.

  2. Convert the margin to a proportion: .

  3. Compute .

  4. Round up to the next whole respondent.

Answer

385 respondents

Source: Normal approximation sample size formula.

Worked example: a finite population

Example 2

Correcting for 1,000 people

Problem

The same survey covers a population of 1,000. What sample is needed with the finite population correction?

Solution

  1. Start from .

  2. Apply with .

  3. The denominator is .

  4. Divide: .

Answer

278 respondents

Source: Finite population correction.

Worked example: a mean

Example 3

Estimating a mean within 2 units

Problem

A pilot study suggests a standard deviation of 10. How many observations are needed to estimate the mean within 2 units at 95 percent confidence?

Solution

  1. Use .

  2. Substitute , , and .

  3. Compute .

Answer

97 observations

Source: Normal approximation sample size formula.

Common mistakes

  • Entering 5 for a 5 percentage point margin instead of 0.05.
  • Using a prior proportion that is far from 0.5 without justification. Values near 0.5 require the largest sample.
  • Forgetting the finite population correction when the population is small.
  • Ignoring cluster design effects, which can multiply the required sample severalfold.
  • Rounding down. Always round up to the next whole observation.
  • Treating the result as a guarantee. It is a planning estimate under stated assumptions.

Limits and assumptions

The formulas assume a simple random sample and a normal approximation. They do not account for stratified, cluster, or weighted designs, and they do not replace a power calculation for a hypothesis test. For a formal study, state the design, the expected response rate, the design effect, and the software or reference used for the calculation.

Key takeaways

  • Sample size depends on confidence, margin of error, and the planning proportion or standard deviation.
  • Use p = 0.5 when no prior proportion is available.
  • The finite population correction reduces the sample for small populations.
  • Add nonresponse and design effects before fielding the study.