HomeCalculatorsStatisticsSample Size Calculator

Sample Size Calculator

Statistics

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

Reviewed by the thecalcu.com team · Last updated July 15, 2026

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.

Why Use a Sample Size Calculator?

Planning a study without calculating required sample size upfront risks two costly mistakes: under-sampling (your results turn out too imprecise to draw firm conclusions, wasting the entire study) or over-sampling (you spend far more time and money than necessary collecting data whose extra precision adds little value).

This calculator makes the underlying formula, which involves squaring a ratio of z-score, standard deviation, and margin of error, instant and error-free. It also shows the raw, unrounded calculation alongside the properly rounded-up final sample size, so you understand exactly how the number was derived.

For teams that need to justify a research budget or timeline to stakeholders, having a clear, formula-backed sample size requirement is far more persuasive than an arbitrary round number.

Who Should Use This Calculator?

Market researchers and survey designers planning how many respondents are needed before launching a customer satisfaction survey, product feedback study, or market sizing research.

Academic researchers and graduate students determining sample size requirements for a thesis, dissertation, or grant proposal, where reviewers commonly ask for a justified sample size calculation.

UX researchers and product teams planning usability studies or in-app surveys, where over-sampling wastes user goodwill and under-sampling produces unreliable insights.

Quality assurance and manufacturing teams determining how many units from a production run must be inspected to estimate a quality metric (like average tensile strength) within an acceptable margin of error.

Clinical and public health researchers planning studies that require institutional review board justification for sample size and statistical power.

What Insights Does This Calculator Give You?

Required Sample Size, the headline number: the minimum count of observations needed, always rounded up to guarantee your target precision is met or exceeded.

Z-Score Used, the confidence-level multiplier driving the calculation. Seeing this explicitly helps you understand why increasing confidence level increases the required sample size.

Raw (Unrounded) Value, the exact mathematical result before rounding, useful for understanding how close you are to a sample size threshold and for sensitivity-checking your inputs.

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.

Show formula & methodology ↓Show less ↑

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

How do I calculate the minimum sample size needed for a survey?
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.
Why do you always round the sample size up, not to the nearest whole number?
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.
What happens to required sample size if I want a smaller margin of error?
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.
How does confidence level affect required sample size?
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.
What if I don't know the population standard deviation?
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.
Does the required sample size depend on the total population size?
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.
What is a typical margin of error to target in survey research?
±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.
How is sample size calculation different for proportions versus means?
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.
Why does my calculated sample size seem too large to be practical?
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.
How does this calculator connect to margin of error and confidence intervals?
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.
Is a bigger sample size always better?
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.
What's the difference between statistical sample size and practical sample size?
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