Home›Calculators›Statistics›Sample Size Calculator

Sample Size Calculator

Statistics

Find the minimum sample size needed for a survey or experiment in seconds. Enter confidence level, margin of error, and estimated standard deviation to get your answer.

0.1100
01,000,000

Required Sample Size

35
Z-Score Used
1.96
Raw (Unrounded) Value
34.57

This calculator computes your Required Sample Size, Z-Score Used, Raw (Unrounded) Value from the values you enter.

Inputs
Confidence LevelDesired Margin of ErrorEstimated Std Deviation
Outputs
Required Sample SizeZ-Score UsedRaw (Unrounded) Value

What is a Sample Size?

The Sample Size Calculator tells you the minimum number of observations needed in a sample to estimate a population mean with a target margin of error, at a chosen confidence level. Enter your desired confidence level, target margin of error, and an estimated standard deviation, and the calculator returns the exact sample size you need to collect.

Determining sample size before collecting data is one of the most important — and most frequently skipped — steps in research design. Collecting too few observations produces an estimate too imprecise to be useful; collecting far more than necessary wastes time and budget. This calculator removes the guesswork from that planning step.

Once you've collected data at the recommended sample size, feed your actual results into the Confidence Interval Calculator to report your final result as a precise range.

How to use this Sample Size calculator

  1. Select your confidence level — 90%, 95% (most common), or 99% depending on how certain you need to be.

  2. Enter your desired margin of error — how precise you want your final estimate to be, in the same units as your standard deviation.

  3. Enter your estimated standard deviation — from a pilot study, prior research, or a reasonable assumption about your population's variability.

  4. Read the required sample size — this is the minimum number of observations to collect.

  5. Add a practical buffer — consider collecting 10-20% more than the calculated minimum to account for incomplete or unusable responses.

  6. Use the actual data with the Confidence Interval Calculator — once your study is complete, plug your real sample mean and standard deviation into the Confidence Interval Calculator to report your final range.

Formula & Methodology

Sample size formula (for a mean, continuous data):
n = (z Ɨ σ / E)²

Variable definitions:
- z — z-score for the chosen confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%)
- σ — estimated population standard deviation
- E — desired margin of error

Worked example:

A researcher wants to estimate average daily screen time with 95% confidence and a margin of error of ±5 minutes, based on a prior study estimating a standard deviation of 15 minutes.

Step 1 — z = 1.96 (95% confidence)

Step 2 — n = (1.96 Ɨ 15 / 5)² = (5.88)² = 34.57

Step 3 — Round up: n = 35 respondents

Assumption: This formula is for estimating a population mean from continuous data and assumes the population is large relative to the sample (no finite population correction applied). For estimating a proportion (e.g., a yes/no survey question), the related formula n = (z² Ɨ p(1āˆ’p)) / E² should be used instead, with p as the estimated proportion (0.5 is the conservative default when no prior estimate exists).

Frequently Asked Questions

Use the formula n = (z Ɨ σ / E)², where z is the z-score for your desired confidence level, σ is your estimated standard deviation (or a conservative guess if unknown), and E is your desired margin of error. For example, at 95% confidence (z = 1.96) with an estimated standard deviation of 15 and a target margin of error of 5, n = (1.96 Ɨ 15 / 5)² ā‰ˆ 34.6, which rounds up to 35 respondents.
Rounding up ensures your actual margin of error is at least as small as your target — rounding to the nearest whole number could round down and leave you slightly under-sampled, meaning your real margin of error would end up larger than intended. For example, if the formula gives n = 34.2, using n = 34 respondents would produce a slightly wider margin of error than your target, while n = 35 guarantees you meet or beat it.
Required sample size grows quadratically as margin of error shrinks, because E appears squared in the denominator of the formula. Halving your target margin of error roughly quadruples the required sample size. For example, targeting a margin of error of 2.5 instead of 5 (with the same std deviation and confidence level) roughly quadruples the calculated sample size from about 35 to about 139.
Higher confidence levels require larger sample sizes because they use a bigger z-score. Moving from 90% (z = 1.645) to 99% (z = 2.576) confidence — holding margin of error and standard deviation fixed — increases the required sample size by roughly (2.576/1.645)² ā‰ˆ 2.45Ɨ, meaning you'd need about two and a half times as many respondents for the higher confidence level.
Use your best estimate — from prior studies, a pilot survey, or a conservative assumption. For proportions (like a yes/no survey question) where you have no prior data, a common conservative approach is to assume maximum variability, which corresponds to a proportion of 0.5 in the alternative proportion-based sample size formula n = (z² Ɨ p Ɨ (1āˆ’p)) / E². This calculator uses the standard-deviation-based formula for continuous data, which is appropriate for averages (like average spending or average rating) rather than yes/no proportions.
For large or unknown populations (the typical case for national surveys, customer research, or web analytics), the formula used here (n = (zĆ—Ļƒ/E)²) does not require knowing the population size — it assumes the population is effectively infinite relative to the sample. For small, known populations (e.g., all 200 employees at a single office), a finite population correction factor can reduce the required sample size slightly, since sampling a larger fraction of a small population yields more information per respondent.
±5% is the most common target for general public opinion surveys and is considered acceptable for most business decisions. ±3% is used for higher-stakes research like national political polling, and requires a substantially larger sample. ±10% or wider is sometimes accepted for quick, low-stakes pilot studies or internal exploratory research where speed matters more than precision.
For a mean (like average age or average spending), the formula uses an estimated standard deviation: n = (zĆ—Ļƒ/E)². For a proportion (like the percentage who prefer option A), the formula instead uses n = (z² Ɨ p(1āˆ’p)) / E², where p is the estimated proportion. Both formulas follow the same underlying logic — squaring the ratio of the confidence multiplier to the target precision — but use different variability estimates appropriate to the data type.
Large required sample sizes usually result from wanting a very tight margin of error, a very high confidence level, or a high-variability population (large standard deviation) — often a combination of all three. If the required n isn't feasible given your budget or timeline, consider accepting a slightly wider margin of error, a lower confidence level (90% instead of 99%), or focusing your study on a more homogeneous subgroup with lower natural variability.
This calculator answers 'how many observations do I need?' — it's the mirror image of the [Margin of Error Calculator](/margin-of-error-calculator/), which answers 'given my sample size, how precise is my estimate?' Once you've collected your data at the recommended sample size, use the [Confidence Interval Calculator](/confidence-interval-calculator/) to report your actual result as a range around the sample mean.
Larger samples reduce sampling error and produce narrower confidence intervals, but they also cost more time and money to collect, and returns diminish quickly — quadrupling your sample only halves your margin of error. Beyond a certain point (often a few hundred to a few thousand respondents for most business surveys), the precision gained from additional respondents is rarely worth the added cost, and effort is better spent reducing bias in how the sample was selected.
The statistically required sample size (from this calculator) is the mathematical minimum needed to hit your target precision. The practical sample size you actually collect should typically be somewhat larger, to account for incomplete responses, data entry errors, or participants who drop out partway through a study — researchers commonly inflate the calculated minimum by 10-20% as a buffer.
Also known as
sample size formulasurvey sample size calculatorstatistical power sample sizeresearch sample size calculatorminimum sample size