Home Templates Calculators Videos Academy Software About Contact Login
Statistics

Sample Size Calculator

Calculate the minimum sample size needed to achieve your target precision — for estimating means, detecting differences between two groups, or measuring proportions. Includes a precision vs sample size trade-off chart.

PDF Guide
Was this useful?

Enter your parameters

Select the study type, then fill in the inputs. All calculations use two-sided tests.

Estimate from historical data Enter a positive standard deviation.
Maximum acceptable difference from the true mean (same units as σ) Enter a positive margin of error.
Estimate of within-group variation Enter a positive standard deviation.
Smallest difference worth detecting Enter a positive detectable difference.
Expected defect rate or percentage (0 to 1). Use 0.5 if unknown. Enter a proportion between 0 and 1.
Acceptable error around the proportion — e.g. 0.03 means ±3% Enter a positive margin of error (less than the proportion).
🧮

Ready to calculate

Choose your study type, enter the parameters, and press Calculate to see the minimum sample size with a precision trade-off chart.

Required sample size
samples required
Key parameters
What this means

Precision vs Sample Size Trade-off
See how increasing sample size reduces the margin of error — and where diminishing returns kick in
Required n
Your target
Practical Guidance for Your Study
How to plan, justify, and optimise your sample size decision
Simulation Lab

Sample Size Simulation

StDev of 8 minutes, 95% confidence, ±2 minutes tolerance. Enter the lab and find the minimum sample you actually need.

Complete guide

Sample Size Calculator Guide

Use the calculator above to find the minimum sample size needed to achieve the precision you want — for estimating a mean, detecting a difference between two groups, or measuring a proportion. The right sample size protects you from drawing false conclusions and from over-spending on data collection.

What it is

What is sample size?

Sample size is the number of observations you need so that your estimate is precise enough, or that your hypothesis test has enough power to detect a real difference. Too small and the result is noise; too large and you waste effort and money. The right size depends on the variability of the data and the size of effect you want to detect.

Calculation logic

How the calculation works

For a mean: n = (Z × σ ÷ E)², where σ is the standard deviation and E is the margin of error you want. For a proportion: n = (Z² × p(1−p)) ÷ E². For comparing two groups, the formula includes both the desired statistical power and the minimum detectable difference. The calculator handles each case.

Worked example

Worked example: sizing a customer-satisfaction survey

A team wants to estimate average satisfaction within ±0.2 points with 95% confidence. The standard deviation of past scores is 1.5. n = (1.96 × 1.5 ÷ 0.2)² ≈ 216 customers. Anything less and the interval is too wide to detect the changes leadership cares about.

If they accept ±0.3 precision instead, sample size drops to 97 — less than half. The calculator makes the precision-vs-cost trade-off explicit, so leadership can choose how much rigour they want to pay for before commissioning the survey.

Why it matters

Operational impact

Sample size discipline saves money on over-collection and protects against decisions made on under-powered data. It is the single most leveraged statistical choice in any improvement project.

Decision making

When to use it

Use this calculator before any survey, audit, capability study, A/B test or DOE. Calculating the right n in advance is far cheaper than discovering after the fact that the sample wasn’t big enough.

Lean Six Sigma

Link to Six Sigma

Sample size sits in DMAIC Measure. Combined with power analysis and effect size, it ensures the inferential workflow (hypothesis tests, CIs, DOE) actually produces reliable conclusions.

Industry examples

Where sample size is useful

Quality controlSize capability studies and Measurement System Analysis correctly to avoid invalid conclusions.
Market researchSize surveys to detect meaningful differences in customer satisfaction or NPS movements.
Clinical trialsPower-based sample sizing is required by regulators and ethics committees.
A/B testingPre-calculate n per variant to avoid stopping tests early on noisy results.
Common mistakes

Watch-outs before using sample size

  • Skipping sample-size calculation and "just collecting some data" — then discovering the result is inconclusive.
  • Using last project’s sample size as a default rather than recalculating for the new effect size and variability.
  • Forgetting that detecting smaller effects requires disproportionately larger samples (n grows as the square of 1/E).
  • Confusing precision (CI width) with power (ability to reject H₀) — they are related but distinct concepts.
  • Using a normal-distribution formula on small samples that should use the t-distribution.
What to do next

Turn the result into action

Decide what effect size matters before collecting data. Use the calculator to find n, then add a margin (10-20%) for missing data and non-response. Re-check assumptions (σ, p) once early data is in.

Resources

Templates, videos and learning

Pair sample size with confidence intervals, hypothesis testing and power analysis for a complete inferential design workflow.

Frequently asked questions

How do you calculate sample size?

For a mean: n = (Z × σ ÷ E)². For a proportion: n = (Z² × p(1−p)) ÷ E². For comparing two groups, include desired power and the smallest difference you need to detect.

Why does sample size matter?

Too small and you cannot detect real differences; too large and you waste time and money. The right size delivers the precision you need at the minimum cost.

Is bigger always better for sample size?

No. Beyond a point, doubling sample size only narrows the interval by 1/√2 (~30%). The cost grows linearly while precision grows with the square root — diminishing returns set in quickly.

What confidence level should I use?

95% is the default for most business decisions. Use 99% for safety-critical or regulatory contexts. Use 90% only when speed and cost matter more than rigour.

How do you size for hypothesis tests?

Use power-based formulas that incorporate the desired statistical power (commonly 80%), the significance level (commonly 5%), and the smallest difference worth detecting (the minimum detectable effect).

Want to understand how sample size decisions affect your measurement system and conclusions? The Green Belt covers this in full.

View Green Belt →