Skip to content

Sample Size for a Mean

Plan how many observations you need to estimate a mean to a target level of precision.

What this answers

This planner answers "how many observations do I need, before I collect any data, to estimate a mean to a specific target precision?" The answer depends entirely on how variable the underlying quantity is (its assumed standard deviation): a more variable quantity needs a larger sample to pin down to the same precision as a less variable one.

How it is calculated

Required sample size is the square of your confidence level's z critical value times the assumed standard deviation, divided by your target margin of error, then rounded up to a whole number. This assumed standard deviation is the single biggest driver of the result, and it typically comes from a pilot study, prior published research, or a conservative estimate, never guessed without basis.

Worked example

For an assumed standard deviation of 10, a target margin of error of 2, and 95% confidence: the required sample size works out to 97, meaning you would need 97 observations to estimate the true mean to within about 2 units, 95% of the time, under this assumed variability.

Assumption audit

Calculated from your data: whether your inputs (margin of error, standard deviation, confidence level, attrition rate) fall within valid ranges.
Evidence to review: how confident you actually are in your assumed standard deviation. If the true variability turns out to be higher than assumed, your actual achieved margin of error will be wider than planned.
You must verify: that your planned sampling method can actually reach genuinely independent, representative observations at the recommended scale. No sample size calculation can fix a biased sampling method.

Common mistakes

A common mistake is underestimating the assumed standard deviation to make the required sample size look smaller and more affordable, which only produces a study that achieves a wider margin of error than planned once real data comes in. Another is confusing margin of error with standard deviation; the margin of error is how precisely you want to pin down the mean, while the standard deviation describes how spread out individual observations already are, and the two should never be set to the same value. A third is forgetting that this formula targets a confidence interval's width, not a hypothesis test's power, so it answers a different planning question than the Sample Size for Two Means engine.

Limitations

This formula assumes a simple random sample and uses the normal approximation appropriate for the sample sizes typically involved here. It does not account for clustering, stratification, or other complex survey designs.