Find the required sample size for surveys and studies using Cochran's formula — with confidence level, margin of error, and finite population correction.
Results update live as you type.
Required sample size
Cochran n₀
385
infinite population
Finite-pop n
N/A
no pop. size given
Z-score
1.96
95% confidence
Margin of error
±5%
half-width of CI
| Confidence | Z-score | α | Use case |
|---|---|---|---|
| 80% | 1.282 | 0.20 | exploratory |
| 90% | 1.645 | 0.10 | pilot studies |
| 95% | 1.960 | 0.05 | academic default |
| 98% | 2.326 | 0.02 | higher-stakes |
| 99% | 2.576 | 0.01 | medical trials |
| 99.9% | 3.291 | 0.001 | safety-critical |
The Method
For a proportion, this calculator uses Cochran's formula
n₀ = Z² × p(1−p) / E², where Z is the z-score for your confidence
level, p is the assumed population proportion, and E is the margin
of error (half-width of the confidence interval). For a mean, it uses
n = (Z × σ / E)² with the standard deviation σ. When you supply a finite
population size N, the result is adjusted using the
finite population correction: n = n₀ / (1 + (n₀ − 1) / N).
Working for current inputs
About This Tool
A sample size calculator tells you how many respondents, observations, or measurements you need to draw conclusions about a population with a given level of statistical confidence. The right sample size strikes a balance: large enough to detect the effect you care about, but small enough to be feasible and cost-effective.
This calculator implements the two most common scenarios. For estimating a proportion (e.g. "what percentage of voters support candidate X?") it uses Cochran's formula, the workhorse of survey research. For estimating a mean (e.g. "what is the average blood pressure?") it uses the standard-deviation-based formula. Both can be adjusted with the finite population correction when the target group is small (the correction is negligible above ~10,000 people but matters significantly for small populations like a school class or a single workplace).
The four levers that drive sample size are confidence level (how often a 95% CI would actually contain the true value if you repeated the study many times), margin of error (the half-width of that CI — smaller margin requires larger n), variability (proportion p or standard deviation σ — more variable populations need larger samples), and population size (only relevant for small, well-defined groups). The relationship is non-linear: halving the margin of error requires quadrupling the sample size.
Use this free sample size calculator for surveys, market research, A/B tests, clinical pilot studies, opinion polls, and academic research. Results assume simple random sampling; more complex designs (stratified, clustered, multistage) require dedicated software and design-effect adjustments.
Cochran's Formula
Industry-standard formula for proportion sampling — used in every survey textbook.
Mean Sampling
Compute n for continuous outcomes from a known or estimated standard deviation.
Finite Population
Apply the FPC correction automatically when you enter a population size N.
Six Confidence Levels
From 80% (exploratory) to 99.9% (safety-critical), with z-scores shown.
Sensitivity Chart
See how n changes with margin of error — at a glance.
100% Free & Private
No account, no tracking — every calculation runs locally in your browser.
Plan a robust survey or study in under a minute.
Choose Proportion for categorical outcomes (e.g. yes/no, support/oppose, defective/OK) or Mean for continuous measurements (e.g. blood pressure, income, satisfaction score).
Pick 95% for most academic and market-research use cases. Higher confidence (98%, 99%) is appropriate when wrong conclusions carry real cost — e.g. medical decisions.
The margin of error is the half-width of your confidence interval. ±5% is typical for political polls; ±3% for high-precision research. Remember: halving E quadruples n.
For proportions, use p = 50% if you have no prior estimate — it gives the largest, safest sample size. For means, use a pilot study or literature value for σ.
If your target group is small (a single school, a single town), enter N to apply the finite population correction. Leave it blank for very large or unknown populations.
The summary shows your required sample size. Use the sensitivity chart to see how n shifts when you tighten or relax the margin of error — handy for trading precision for cost.
Everything you need to know about sample sizes, confidence levels, and how to interpret your result.
Sample size (n) is the number of individuals you survey or measure in order to estimate a population parameter. A larger sample gives a smaller margin of error and a tighter confidence interval, but with strongly diminishing returns: halving the margin of error requires quadrupling the sample. So sample-size planning is really about finding the smallest n that still meets your precision requirement.
95% confidence (Z = 1.96) is the standard default for most surveys and academic research. Use 99% (Z = 2.576) when the stakes are high — medical trials, safety-critical decisions, regulatory submissions. Use 90% (Z = 1.645) for exploratory or pilot work where a slightly higher false-positive rate is acceptable. Higher confidence always requires a larger sample.
The variance term in Cochran's formula is p(1 − p), which is maximised at p = 0.5 (giving 0.25). If you have no prior estimate of the true proportion, using 50% is the conservative choice — the resulting n is guaranteed to be enough no matter what the true proportion turns out to be. If you do have prior information (e.g. previous polls suggesting 80% support), using that estimate gives a smaller, still-valid sample.
Only when your sample would be a large fraction (> 5%) of the target population. For a small-town survey of 500 people, the finite correction matters a lot; for a national survey of 320 million Americans, it doesn't. Leave the population field blank for an infinite-population estimate. The correction always reduces the required n (you don't need to sample more of a population than exists).
Margin of error (E) is the half-width of your confidence interval. If a poll reports "45% support, margin of error ±3%", it means the true population value lies somewhere between 42% and 48% with the stated confidence. Smaller E means a more precise estimate, but it requires a larger sample — and the relationship is quadratic, so cutting E in half costs you 4× the respondents.
Cochran's formula is the standard sample-size formula for proportions: n₀ = Z² × p(1 − p) / E². It assumes simple random sampling and a large (or infinite) population. For finite populations, apply the correction: n = n₀ / (1 + (n₀ − 1) / N). The formula is named after statistician William Gemmell Cochran, who published it in his 1953 textbook Sampling Techniques.
For means (continuous outcomes), the formula uses the population's standard deviation: n = (Z × σ / E)². You'll need a prior estimate of σ from a pilot study, prior literature, or a rough rule-of-thumb (range / 4 is a common first guess). For proportions (categorical outcomes), variability is captured by p(1 − p), which is bounded between 0 and 0.25 — making proportion sample sizes easier to plan in advance.
The formulas assume simple random sampling (every member of the population has an equal chance of being selected), independence between observations, and approximate normality of the sampling distribution (which holds for any moderately large n by the central limit theorem). Complex survey designs — stratified, clustered, multistage — require larger samples and a design effect adjustment; consult a survey statistician.
Yes. The n returned here is the number of completed responses you need. To get that many, you have to send out more invitations to account for non-response. A 30% response rate means you need to invite roughly n / 0.30 people. Non-response also introduces bias (non-responders may differ systematically from responders), which sample-size formulas alone cannot fix — careful study design and follow-up is essential.
Statistically, yes — bigger samples always give narrower confidence intervals. But practically, no: larger samples cost more money and time, and beyond a certain point the precision gain is trivial. Going from n = 1,000 to n = 4,000 halves the margin of error from ±3% to ±1.5%, but if your decision threshold is "50% vs not 50%", that extra precision rarely changes the conclusion. Plan for the precision you actually need, not the maximum you could afford.