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
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:
How Required Sample Size Scales with Precision
| Margin of Error (E) | Required n |
|---|---|
| 5.0 | 35 |
| 2.0 | 217 |
| 1.0 | 865 |
| 0.5 | 3,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.
How to Use This Calculator
- Select a confidence level: 90%, 95%, or 99%.
- Enter the population standard deviation.
- Enter the desired margin of error, in the same units as the standard deviation.
- 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.