Sample Size for Mean Calculator
This calculator tells you how many observations you need to estimate a population mean to within a chosen margin of error at a given confidence level.
Confidence level
Rounded up to the next whole respondent
- 1
Critical value z* (95% confidence)
1.96 - 2
z* × σ ÷ E
1.96 × 15 ÷ 3 = 9.8 - 3
Square the result
(9.8)² = 96.04Raw (unrounded) required sample size. - 4
Round up to whole respondents
⌈96.04⌉ = 97
How does this calculator work?
To estimate a population mean within margin of error E, compute n = (z*·σ/E)², where z* is 1.645, 1.96, or 2.576 for 90%, 95%, or 99% confidence, then round up. Larger spread or tighter precision raises n; sample size grows with the square of 1/E.
Formula
How this is calculated
The required sample size for estimating a mean comes from inverting the confidence-interval margin of error. A confidence interval for a mean has half-width E = z* × σ / √n, where z* is the standard-normal critical value for your confidence level, σ is the population standard deviation, and n is the sample size. Solving for n gives n = (z* × σ / E)².
The confidence level selects z*: 90% uses z* = 1.645, 95% uses z* = 1.96, and 99% uses z* = 2.576 (two-sided values). A larger σ widens the natural spread and increases the sample needed, while a smaller margin of error E demands a sharply larger sample because n scales with 1/E². Because n must be a whole number and you can never under-sample, the raw value is always rounded up (ceiling) to the next integer.
This formula assumes you know (or can reasonably estimate) σ and that the sample mean is approximately normally distributed, which holds for large samples by the Central Limit Theorem. If σ is unknown and the sample is small, a t-based approach is more accurate, but the z formula is the standard planning tool. E and σ must be expressed in the same units and both must be positive.
Frequently asked questions
Use an estimate from a pilot study, prior research, or a rough range (range ÷ 4 or ÷ 6 is a common proxy). A larger assumed σ gives a more conservative, larger sample size.
Sample size scales with 1/E². Because E is squared in the denominator, cutting E in half multiplies the required n by four.
Always round up. Rounding down would leave your margin of error slightly larger than the target, so the ceiling guarantees you meet your precision goal.
Also known as
TG we-Calculate Editorial Team. (2026). Sample Size for Mean Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/sample-size-for-mean-calculator
TG we-Calculate Editorial Team. "Sample Size for Mean Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/sample-size-for-mean-calculator.
TG we-Calculate Editorial Team, "Sample Size for Mean Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/sample-size-for-mean-calculator
@misc{wecalculate_sample_size_for_mean_calculator, title = {Sample Size for Mean Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/sample-size-for-mean-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
