Statistics

Sample Size for Mean Calculator

Calculates the minimum sample size needed to estimate a population mean within a chosen margin of error at 90, 95, or 99 percent confidence, using the population standard deviation.

What this calculator does

The Sample Size for Mean Calculator estimates your result instantly from the values you enter, using standard statistics formulas. Calculates the minimum sample size needed to estimate a population mean within a chosen margin of error at 90, 95, or 99 percent confidence, using the population standard deviation. Calculations run in your browser, so nothing you type is sent to a server, and the output is an estimate rather than a certified or official figure.

Sample Size for Mean Calculator

Result

—
Required Sample Size

About Sample Size for Mean Calculator

This calculator finds the minimum sample size for estimating a population mean. It squares the product of the z score and the standard deviation divided by the margin of error, then rounds up: n = ⌈(z × σ ÷ E)²⌉.

Choose 90%, 95%, or 99% confidence and the matching z value (1.645, 1.96, or 2.576) is applied for you.

Formula & Mathematical Calculation

Required Sample Size = f(Population std. deviation (σ), Desired margin of error, Confidence level)

Calculated according to standard stats formulas implemented in the calculator core.

Calculation Example

With a standard deviation of 15, a margin of error of 2, and 95% confidence (z = 1.96): n = (1.96 × 15 ÷ 2)² = 14.7² = 216.09, rounded up to 217 observations.

Key Benefits

  • Rounds up to a whole number so the margin of error is always met
  • Offers 90, 95, and 99 percent confidence without looking up z values
  • Shows the exact count needed before you start collecting data

How to Use this Calculator

  1. Enter the standard deviation
    Type the population standard deviation (sigma) into its field, for example 15.
  2. Enter the margin of error
    Type the largest error you can accept in the estimate into the Desired margin of error field, for example 2.
  3. Pick a confidence level
    Choose 90%, 95%, or 99% from the Confidence level menu, then select Calculate to see the required sample size.

Assumptions & Limitations

What the calculation assumes

  • Every value you enter is treated as an exact, known amount.
  • Any rate or interval you enter is assumed to hold for the whole period unless the form asks for it separately.
  • Results use standard published formulas and account only for the values entered above.
  • Rounding is applied for display; the underlying calculation uses your full precision.
  • Results are returned in the same units you enter, unless the tool states the output unit.

What it does not cover

  • Sample Size for Mean Calculator produces a calculated result for reference and learning, not a certified or official measurement.
  • Real-world outcomes differ when tolerances, rounding rules or local standards apply.
  • Definitions and standards vary by region and change over time; verify the convention that applies to your case.
  • Figures are only as accurate as the inputs you supply — check them before acting on the result.
  • For work where the result carries real consequences, confirm it against an authoritative source.

Frequently Asked Questions

It uses n = ceil((z * sigma / margin of error)^2), where z comes from the chosen confidence level.

Sample size must be a whole number, and rounding up guarantees the margin of error is met rather than exceeded.

90% uses 1.645, 95% uses 1.96, and 99% uses 2.576.

Free to use, no account needed. Calculations run in your browser, so nothing you type is sent to a server. Results are estimates — how we build and check our calculators.