Sample Size Calculator
Find the minimum survey size for any confidence level and margin of error.
Sample Size Calculator
Find the minimum number of respondents needed to hit a target margin of error at the chosen confidence level.
Sample Size vs Margin of Error
How required sample size shrinks as you accept a larger margin of error, holding the current confidence level and proportion fixed. The relationship is quadratic — halving the margin quadruples the n.
Confidence Level vs Required Sample Size
How required sample size grows with stricter confidence levels at the current proportion and margin of error.
Population Size Impact
How the required sample size changes across population sizes at the current confidence level, margin of error, and proportion. Beyond ~20,000 the finite population correction barely matters — a key reason national polls work with ~1000 respondents.
Z-Score Confidence Reference
| Confidence | Z-Score | Typical use |
|---|---|---|
| 80% | 1.282 | Internal exploration, fast directional reads |
| 85% | 1.440 | Pilot studies and concept tests |
| 90% | 1.645 | Market research, business decisions |
| 95% | 1.960 | Standard survey reporting, A/B testing |
| 98% | 2.326 | High-stakes business decisions |
| 99% | 2.576 | Medical trials, regulatory submissions |
Z-scores are the standard two-sided critical values for the normal distribution; the confidence-level calculation uses the Abramowitz & Stegun erf approximation (Φ accurate to ≈ 1.5 × 10⁻⁷). Always round required n up and add a 10–20% buffer for non-response in real surveys. Read more in our methodology and editorial policy.
What Is a Sample Size?
Sample size (n) is the number of observations you collect from a population to make a defensible inference about that population — the count of survey respondents, lab measurements, conversion events in an A/B test, or units inspected on a production line. Statistical sampling theory gives you a closed-form recipe for the smallest n that still meets a stated precision target: the Cochran formula n = Z²·p·(1−p) / E². Halve the margin of error and you quadruple n; bump confidence from 95% to 99% and n grows by roughly 70%. Sample size is the single most important number in any survey budget.
This page bundles five tools onto one URL: a Sample Size Calculator that returns the recommended n from confidence level, margin of error, and expected proportion; a Margin of Error Calculator that runs the same formula in reverse; a Confidence Interval Calculator for the population mean; a Confidence Level Calculator that reverses a fixed sample into its implied confidence; and a Finite Population Correction tool for small populations. Pair it naturally with the z-score calculator, the standard deviation calculator, and the probability calculator.
How Sample Size Works
Choose a confidence level
Pick the long-run probability that your interval contains the true value — 90, 95, or 99% are the standard reporting levels. Each level maps to a critical Z-score: 1.645 at 90%, 1.960 at 95%, 2.576 at 99%.
Decide on a margin of error
Margin of error E is the half-width of your confidence interval. A 3% margin at 95% confidence means the survey estimate will land within ±3 percentage points of the true value 95 times out of 100.
Estimate the population proportion
If you have prior data, plug it in. If not, use 50% — the variance p(1−p) is maximised at p = 0.5, so that choice produces the largest, safest n. Specialty surveys with rare characteristics often need much smaller samples.
Apply finite population correction
When n / N exceeds ~5%, divide the unadjusted n₀ by 1 + (n₀ − 1) / N. This shrinks the requirement because depleting a small pool reduces the practical sampling error.
6 Ways to Use This Sample Size Calculator
Plan a survey from scratch
Pick your confidence level and target margin of error, plug in the expected proportion, and let the calculator return the minimum n. Add a 10–20% buffer for non-response.
Audit a survey already collected
Switch to the Margin of Error tab to find out how precise your existing dataset actually is — useful before you draft conclusions for the report.
Estimate a population mean
Use the Confidence Interval tab to bound a numeric average — battery life, response time, monthly spend — from sample mean, SD, and n.
Justify a smaller sample
If your budget caps n, use the Confidence Level tool to show stakeholders what confidence that sample can actually support at your chosen margin.
Correct for a small population
When you survey a panel of 800 or a classroom of 30, the FPC tab returns the correction factor and adjusted margin — the textbook infinite-population formula would oversample.
Compare scenarios visually
The always-on sample-size-vs-margin curve, level-vs-n bar chart, and population-impact chart let stakeholders see exactly how each lever changes the recommendation.
Best Practices for Sample Size Planning
Decide the confidence level and margin of error before you collect data. Picking them after seeing results invites motivated reasoning — researchers tend to relax precision targets to make underpowered surveys look more meaningful. The calculator returns a precise n for any pair of inputs; lock them in writing.
When the population proportion p is genuinely unknown, use 0.5. The variance p(1−p) peaks at p = 0.5, so this choice maximises the required n and guarantees your survey will be precise enough no matter what the true proportion turns out to be. If you do have prior evidence — historical surveys, pilot data, peer-reviewed estimates — plug the real value in to save respondents and budget.
Always inflate the calculator's recommended n by a non-response buffer. Mailed surveys see 20–60% response rates; online intercept surveys, 15–35%. Field a sample about 1.5–2× the statistical minimum to make sure your realised n hits the target.
Why Sample Size Matters
Statistical power
Underpowered studies fail to detect real effects. The required n for a test of a given effect size scales inversely with the squared minimum detectable effect — a survey that can't reliably distinguish a 2-point swing from a 4-point swing is essentially noise.
Budget control
Every respondent costs money — incentives, panel fees, analyst time. Calculating the minimum n lets product, finance, and research lock in a defensible number before fieldwork starts, instead of overspending or scrambling mid-study.
Regulatory acceptance
Clinical trials, FDA filings, and ISO audits all require pre-registered sample sizes with justification. The Cochran formula is the standard reference for proportion-based endpoints; t- and F-based formulae cover continuous endpoints.
Credible reporting
Margins of error and confidence intervals are how reputable polls communicate uncertainty. ‘66% support, ±3% at 95% confidence, n = 1067’ tells the reader exactly what to believe. Without those figures, a single percentage point reads like fact when it's actually noise.
Where Sample Size Gets Tricky
Stratified or clustered samples
The formulas on this page assume simple random sampling. Stratification reduces required n; cluster sampling (talk to whole neighbourhoods or schools) increases it via the design effect. Multiply by the published design effect for your survey type.
Small finite populations
When the survey pool is fewer than ~10,000, the finite population correction matters and the unadjusted formula will oversample. Use the FPC tab to get the right n; for a 500-person panel, the correction can cut required n by 30–50%.
Rare characteristics
When p is very small (say 1–3%), p(1−p) ≈ p, and you need a much bigger n to actually observe enough events. For studies of rare conditions or fraud detection, supplement the formula with sample-size-for-rare-events methods.
Non-response bias
Even a statistically adequate sample can be biased if non-responders differ systematically from responders. Use weighting or non-response follow-up to address this — the calculator can't compensate for a self-selected sample.
The Core Sample Size Formulas
Sample size (infinite population)
n = Z² · p · (1 − p) / E²
Cochran formula — the canonical recipe for proportion-based surveys.
Margin of error
E = Z · √(p (1 − p) / n)
Half-width of the confidence interval for a proportion.
Confidence interval (mean)
x̄ ± Z · s / √n
Z-based bounds on the population mean from sample statistics.
Standard error of mean
SEM = s / √n
Sample SD divided by √n — shrinks with sample size.
Finite population correction
FPC = √((N − n) / (N − 1))
Multiplicative factor applied to standard errors and margins.
Adjusted sample size
n* = n₀ / (1 + (n₀ − 1) / N)
Required n after applying FPC for a finite population.
Implied Z-score
Z = E / √(p (1 − p) / n)
Solving the margin formula for Z to recover confidence.
Standard normal CDF
Φ(z) = ½ [1 + erf(z / √2)]
Maps a Z-score to a cumulative probability.
Two-sided confidence
Confidence = 2 · Φ(|Z|) − 1
Total area of the standard normal between ±Z.
Critical Z at 95%
Z₀.₉₇₅ ≈ 1.960
Most common survey confidence — 95% two-sided.
Critical Z at 99%
Z₀.₉₉₅ ≈ 2.576
Used for high-stakes business and medical reporting.
Maximum variance proportion
p (1 − p) ≤ 0.25
Maximised at p = 0.5 — the conservative choice when p is unknown.
Common Sample Size Mistakes
- 1
Confusing confidence level with margin of error
Confidence level is the probability the interval contains the true value (95%, 99%). Margin of error is how wide that interval is (±3%, ±5%). They are independent levers — both affect required n in different ways.
- 2
Forgetting non-response inflation
The calculator's n is the realised sample you need. If you expect a 40% response rate, you must field roughly 2.5× that many invitations to land at the target.
- 3
Treating n / N < 5% as needing FPC
The finite population correction barely changes anything until n / N exceeds 5%. For a 1067-person poll of a 50-million-person country, the FPC factor is essentially 1.
- 4
Plugging p = 0 or p = 100
p(1−p) is zero at both extremes, which makes the calculator return n = 0. If you genuinely expect ≥ 95% of respondents to share a trait, switch to a binomial confidence-interval method designed for boundary proportions.
- 5
Reusing infinite-population n for small finite groups
Surveying a class of 30 with a 384-person poll formula is wasted effort — the FPC tab here returns the realistic n. Conversely, surveying a panel of 500 without FPC overstates the precision you actually achieved.
- 6
Reporting the calculator's number without justification
A defensible methodology section quotes confidence level, margin of error, expected proportion, response rate, population size, and the formula. Anyone can replicate the n from those inputs; without them, the figure is unfalsifiable.
Industry Use Cases
Market research
Brand tracking studies typically target 95% confidence with a 3–4% margin of error, leading to n ≈ 600–1067. For specialty audiences (luxury buyers, niche professionals), smaller finite populations make FPC essential.
Political polling
National polls quote 95% confidence with a 2.5–4% margin of error — a 1000–1500 respondent sample. Battleground state polls often run smaller and report margins of 4–5%, which the calculator returns automatically once n and confidence are fixed.
Customer satisfaction (CSAT/NPS)
B2B SaaS panels are small finite populations (200–5000 customers), so FPC drops required n meaningfully. A 95% / ±5% NPS read on a 800-customer base needs only about 230 respondents.
Academic research
Graduate theses commonly use 95% confidence at 5% margin of error for population-level inferences. Department-level studies on small student bodies benefit from the finite population correction tab.
Medical studies
Phase II clinical trials targeting a difference in proportions often require 99% confidence and a tighter margin of error (1–2%) — pushing required n into the thousands. The calculator handles this without changing tools.
Product testing & UX research
Discount-usability studies suggest n ≈ 5 catches 80% of issues, but quantitative satisfaction surveys still need full Cochran-based sizing. Use 90% confidence with ±5–10% margin during exploratory rounds.
A/B testing
Web experiments translate sample size into ‘visitors per arm’ — for a 5% baseline conversion and a 1% absolute MDE at 95% confidence and 80% power, you need roughly 13,000 visitors per arm. The proportion calculation here is the textbook basis.
Quality control
ISO 2859 acceptance sampling builds on similar proportion math — for a 1% defective rate at 95% confidence and ±0.5% margin, n approaches 1500. The calculator returns the required n in one step.
Public opinion surveys
Election-eve aggregate polls use 95% confidence with ±2–3% — n in the 1067–2400 range. Cross-tab confidence shrinks because each subgroup has a smaller effective n; report margins per subgroup, not for the headline.
Election forecasting
Roll-up models (538-style averages) combine many small polls each with its own n and margin. The calculator's outputs are the inputs that feed those meta-models — every poll's n drives its weight in the aggregate.
Worked Examples
Example 1 — 95% confidence, 3% margin, unknown proportion
- 1Pick Z(95%) = 1.960 from the standard normal table.
- 2Convert percentages: p = 0.50, 1 − p = 0.50, E = 0.03.
- 3Apply Cochran: n = 1.960² × 0.50 × 0.50 / 0.03² = 3.8416 × 0.25 / 0.0009 = 1067.111.
- 4Round up: required n = 1068 respondents.
Example 2 — margin of error from n = 400 at 90% confidence
- 1Pick Z(90%) = 1.645.
- 2With p = 0.45, compute SE = √(0.45 × 0.55 / 400) = √(0.000619) = 0.02487.
- 3Multiply: E = 1.645 × 0.02487 = 0.04092 — a margin of error of ±4.09%.
- 4Reported result: 45% ± 4.09% at 90% confidence on a sample of 400.
Example 3 — finite population correction on a 1200-person panel
- 1Population N = 1200, sample n = 300, baseline margin E₀ = 4%.
- 2FPC = √((1200 − 300) / (1200 − 1)) = √(900 / 1199) = √0.7506 = 0.8664.
- 3Adjusted margin = 4% × 0.8664 = 3.47%.
- 4Reported result: ±3.47% — about 13% tighter than the uncorrected estimate.
Methodology you can verify
Critical Z-scores for canonical confidence levels are taken from the standard normal distribution to four decimal places; the reverse confidence-level calculation uses the Abramowitz & Stegun erf approximation (Φ accurate to ≈ 1.5 × 10⁻⁷). The Cochran formula and finite population correction match every reference statistics textbook. Read more on the methodology and editorial policy pages.
Frequently Asked Questions
Related Statistics Calculators
Pair the sample size calculator with related statistics and probability tools.
- Z-Score CalculatorZ-score, percentile rank, tail probabilities, Z ↔ probability conversion, and probability between any two Z-scores with bell-curve visualisation.
- Probability CalculatorTwo-event probabilities, unions, intersections, complements, normal distribution, confidence intervals, and step-by-step solutions across five integrated tools.
- Mean Median Mode Range CalculatorFull descriptive statistics — mean, median, mode, range, quartiles, variance, standard deviation, percentiles, skewness, outliers — with charts and step-by-step working.
- Percent Error CalculatorPercent error, relative error, absolute error, accuracy, and full experimental analysis with step-by-step solutions.
- Percentage CalculatorCalculate % of a number, percentage change, and reverse percentages.