Sample Size for Mean Calculator

Sizing a Study Around a Continuous Measurement

When the goal is to estimate a population mean — average height, average processing time, average yield per acre — rather than a proportion, the sample size formula changes shape. It depends on the population's variability (the standard deviation) rather than a proportion's inherent variance, and it scales differently as precision requirements tighten.

The Formula

n = (Z × σ / E)²
where Z is the critical value for the chosen confidence level, σ is the population standard deviation, E is the desired margin of error

Worked Example

Suppose a prior study or pilot sample suggests a standard deviation of 15 units, and the goal is to estimate the mean to within ±2 units at 95% confidence:

n = (1.96 × 15 / 2)² = (14.7)² = 216.09 → rounds up to 217

How Required Sample Size Scales with Precision

Required n at σ = 15, 95% confidence, varying margin of error E
Margin of Error (E)Required n
5.035
2.0217
1.0865
0.53,458

Values computed directly from n = (Zσ/E)² with Z = 1.96, rounded up to the next whole observation.

Because E appears squared in the denominator, halving the margin of error quadruples the required sample — the same square-law relationship that governs the proportion-based version of this formula.

Where This Calculation Matters

  • Experimental design — clinical trials, agricultural field trials, and lab experiments all need a target sample size before enrollment or data collection begins, and this formula (or its two-sample power extension) is the starting point.
  • Budgeting research — each additional observation typically has a real cost, so this calculation converts a precision requirement directly into a resourcing number.
  • Pilot study follow-up — a small pilot study's observed standard deviation is commonly plugged in here to size the full-scale study that follows.
Note: This formula assumes the population standard deviation is known or well estimated from prior data. If σ is uncertain, results should be treated as approximate and revisited once real data starts coming in.

How to Use This Calculator

  1. Select a confidence level: 90%, 95%, or 99%.
  2. Enter the population standard deviation.
  3. Enter the desired margin of error, in the same units as the standard deviation.
  4. Select Calculate to get the minimum required sample size.

Related Calculations

For estimating a proportion instead of a mean, use the Sample Size for Proportion Calculator. To check the resulting margin of error for a specific sample size, see the Margin of Error Calculator.