Calculateus

Sample Size for Mean Estimation Calculator

Calculate the minimum sample size needed to estimate a population mean within a target margin of error.

Result

Required Sample Size
97

About the Sample Size for Mean

This calculator determines the minimum sample size needed to estimate a population mean, such as an average height, income, or measurement, within a target margin of error. Unlike a proportion-based sample size calculation, it uses an estimated standard deviation rather than an assumed percentage.

How It Works

You provide an estimated standard deviation for the variable you are measuring, a target margin of error in the same units, and a confidence level. The calculator combines these into a single formula and rounds the result up to the nearest whole respondent, since a fractional sample size is not usable in practice.

n = ( (z x Standard Deviation) / Margin of Error )^2, rounded up to the next whole number, where z is the z-score for the chosen confidence level.

Formula & Methodology

By hand, multiply the z-score by the estimated standard deviation, divide that product by the target margin of error, then square the result. For example, at 95% confidence (z = 1.96) with a standard deviation of 15 and a margin of error of 3: (1.96 x 15) / 3 = 29.4 / 3 = 9.8, and 9.8 squared is 96.04, which rounds up to 97.

Examples

Moderate variability estimate

With an estimated standard deviation of 15, a target margin of error of 3, and 95% confidence (z = 1.96), n = (29.4/3)^2 = 9.8^2 = 96.04, rounding up to a required sample size of 97.

Higher confidence, tighter margin

With an estimated standard deviation of 25, a target margin of error of 2, and 99% confidence (z = 2.576), n = (64.4/2)^2 = 32.2^2 = 1036.84, rounding up to a required sample size of 1,037.

Advantages

  • Separates the mean-estimation formula from the proportion-based sample size formula, avoiding a common mix-up between the two.
  • Lets researchers see immediately how much a tighter margin of error or higher confidence level inflates the needed sample size.
  • Rounds up automatically so the reported number is always a usable, whole respondent count.

Common Mistakes

  • Using this formula when the outcome is actually a proportion (like a yes/no rate) instead of a continuous mean, which calls for the separate proportion-based sample size formula.
  • Plugging in a standard deviation borrowed from an unrelated population or study, which can produce a required sample size that is badly mismatched to the real variability.
  • Underestimating how much the required sample grows when the margin of error is tightened, since halving the margin of error roughly quadruples the required sample size.

Edge Cases to Watch For

  • Both standard deviation and margin of error must be greater than zero, or the calculator returns an input error.
  • The result is always rounded up, since sampling a fraction of a subject is not meaningful.
  • The formula depends entirely on an estimated standard deviation supplied before data collection, typically from a pilot study or prior research, so the required sample size is only as reliable as that estimate.
  • A tighter margin of error sharply increases the required sample, since the margin of error term is squared in the denominator.

Common Use Cases

  • Researchers designing a study to estimate an average value, such as average spending, test score, or measurement, with a defined precision target.
  • Quality control and manufacturing teams planning how many units to measure to estimate a process average within tolerance.
  • Graduate students and analysts writing a methodology section that needs a defensible, formula-based sample size justification.
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

How is this different from the Sample Size Calculator?

The Sample Size Calculator on this site is built for estimating a PROPORTION (a percentage, like a survey 'yes' rate). This calculator is for estimating a MEAN (an average, like average height or spending) and uses your estimated standard deviation instead of an assumed proportion to determine the required sample size.

Conclusion

Estimating a mean precisely requires a different sample size formula than estimating a proportion, since it depends on variability rather than an assumed percentage. This calculator applies that formula directly so the required sample size can be set before data collection begins.