Math

Sample Size Calculator

Use OmniCalc's sample size calculator to estimate how many observations you need for a target margin of error at a chosen confidence level.

Sample size calculator

Estimate how many observations you need.

Enter a standard deviation, target margin of error, and confidence level to estimate a z-based sample size for a mean.

Advertisement

Why this result matters

What this calculator helps you answer

A natural next-step stats page that helps users plan studies and surveys by sizing samples from variance, precision, and confidence goals. Use the tool above to enter a few clear inputs and get a practical answer you can use right away.

This sample size calculator helps students, researchers, and analysts estimate how many observations they need before collecting data. Enter an expected standard deviation, a target margin of error, and a confidence level to get a quick z-based sample size estimate for a mean.

Formula and method

How the calculation works

The calculator uses the z-based sample-size formula for a mean: n = (critical value × standard deviation / margin of error)^2, then rounds up to the next whole number.

Example

Example sample size calculation

If the standard deviation is 12, the target margin of error is 4, and the confidence level is 95%, the formula gives about 34.57, so you should plan for 35 observations.

FAQ

Common questions about this calculator.

Short answers to the questions people often ask before or after using the tool.

Question

Why do you round the sample size up?

Because you cannot collect a fraction of an observation, and rounding up keeps the margin-of-error target intact.

Question

Why does a smaller margin of error need a larger sample?

A tighter precision goal leaves less room for sampling noise, so the sample size has to increase to compensate.

Question

Why does higher confidence increase sample size?

Higher confidence uses a larger critical value, which pushes the required sample size up.

Related calculators

Related calculators

If the next question is close to this one, these are the best pages to open next.

Math

Confidence Interval Calculator

Use OmniCalc's confidence interval calculator to estimate a plausible range around a sample mean using a chosen confidence level.

Inputs4
Results4
Open calculator

Math

Standard Deviation Calculator

Use OmniCalc's standard deviation calculator to measure how spread out a list of numbers is with either sample or population mode.

Inputs2
Results4
Open calculator

Math

Mean, Median, Mode, Range Calculator

Use OmniCalc's mean, median, mode, range calculator to summarize a list of numbers and understand the center and spread of your data quickly.

Inputs1
Results4
Open calculator

Math

Z-score Calculator

Use OmniCalc's z-score calculator to see how far a value is from the mean in standard-deviation units.

Inputs3
Results3
Open calculator
Advertisement
Back to math calculators