Intermediate

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

Higher confidence needs a larger sample
Estimate of the spread in the population
Half-width of the confidence interval
Required sample size (n)
97

Rounded up to the next whole respondent

Critical value z*
1.96
Population SD (σ)
15
Margin of error (E)
3
Raw n (before rounding)
96.04
Required n
97
Population spread σ; shaded band = target margin ±E = ±3
Step by step
  1. 1

    Critical value z* (95% confidence)

    1.96
  2. 2

    z* × σ ÷ E

    1.96 × 15 ÷ 3 = 9.8
  3. 3

    Square the result

    (9.8)² = 96.04
    Raw (unrounded) required sample size.
  4. 4

    Round up to whole respondents

    ⌈96.04⌉ = 97
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

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
n = (z* × σ / E)², rounded up
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

sample size for mean
sample size calculator
survey sample size
n for mean
required sample size
sample size mean estimate
how many samples needed

APA

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

Chicago

TG we-Calculate Editorial Team. "Sample Size for Mean Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/sample-size-for-mean-calculator.

IEEE

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

BibTeX

@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?