Skip to main content

Sample Size Calculator - Surveys, Confidence Level, Margin of Error

Simple random sample for a proportion or a mean. Not a two-sample RCT power analysis. Default 95%, 5%, p = 0.5 → n = 385. Runs in your browser.

Survey Design Inputs

Proportion e is typed as a percent (5 → 0.05). p is a decimal in (0, 1]. This is Cochran's simple-random-sample formula, then ceiling. It is not alpha/beta/effect-size power for two groups.

Required nCalculated

Required sample size n
385
95% confidence · z = 1.959964
Unrounded n0: 384.14588813
Finite population correction: no (infinite population)
n0 = z² p (1−p) / e², ceil

Default 95% / 5% / p = 0.5 on an infinite population is n = 385.

What This Sample Size Calculator Estimates - and What It Refuses to Pretend

A sample size calculator for surveys answers a narrow question: if you draw a simple random sample from a large population, how many completed responses do you need so that a sample proportion (or a sample mean) has a stated margin of error at a stated confidence level? The headline search query is almost always the proportion version: “how many people do I need to survey?” With 95% confidence, a 5% margin of error, and no better guess than p = 0.5 on an infinite population, the ceiling integer is n = 385. That is the default on this page.

That number is not a license to skip sampling design. It assumes independent draws (or a with-replacement model), a roughly normal sampling distribution of the estimator (the usual n large enough for the central limit theorem), and that “error” means the half-width of a Wald interval z √(p(1−p)/n) for a proportion, or z σ/√n for a mean. Cluster samples, stratified samples, quota panels, and convenience polls do not inherit 385 as if they were SRS. Nonresponse is also outside the formula: if you expect 20% of invitations to complete, you must contact more people than n.

Equally important is what this tool is not. It is not a full RCT power analysis. A two-arm trial that wants to detect a difference in means or proportions needs Type I error α, Type II error β (or power 1−β), and an effect size. Those inputs never appear here. Do not paste n = 385 into a grant as the sample size for a superiority test of two treatments. For a confidence interval around a z-score or a single-sample mean after you already have data, use the confidence interval calculator and the z-score calculator. Descriptive summaries of a list belong on the statistics calculator.

The z critical values are the usual two-sided normal quantiles: 1.644853 at 90%, 1.959964 at 95%, and 2.575829 at 99%. Textbooks that round z to 1.96 still land on 385 after ceiling for the 95%/5%/p=0.5 case. This implementation keeps the longer z so n0 ≈ 384.15 before ceiling, not a slightly different 383.something from a sloppy 1.96 square.

How to Use the Survey Sample Size Tool

  1. Choose proportion for yes/no, vote share, or prevalence. Choose mean when the outcome is a measurement (minutes, kilograms, test scores) and you have a planning value for σ.
  2. Set the confidence level 90, 95, or 99. Higher confidence inflates z and therefore n.
  3. For a proportion, type the margin of error as a percent (5 means e = 0.05) and an estimated p between 0 and 1. Leave p at 0.5 if you have no pilot. For a mean, type e and σ in the same units.
  4. Optionally enter a finite population N to apply the finite population correction. Leave N blank for an “infinite” population (the usual national poll approximation).
  5. Read the integer n, copy it, or clear the form. Values stay in this browser for up to 30 days.

The Cochran Proportion Formula and Why n Ceilings to 385

n0 = z² p (1 − p) / e²
then n = ceil(n0), or with FPC: n = ceil( n0 / (1 + (n0 − 1)/N) )

Rearrangement of the Wald half-width e = z √(p(1−p)/n) for a planned proportion. Square both sides and solve for n. The product p(1−p) peaks at 0.25 when p = 0.5, which is why the default is conservative. If a previous wave showed 12% prevalence, p = 0.12 shrinks n because the Bernoulli variance is smaller near 0 or 1.

Worked default: z = 1.959964, p = 0.5, e = 0.05. Then z² ≈ 3.84146, times 0.25 is 0.96036, divided by 0.0025 is n0 ≈ 384.15. Survey practice always rounds up - you cannot interview 0.15 of a person, and rounding down would undershoot the margin of error. ceil(384.15) = 385.

Tighter error is expensive. At 95% and p = 0.5, e = 3% (0.03) gives n0 ≈ 1067, the other famous poll number. e = 1% is about 9,604. Doubling precision (halving e) quadruples n because e sits in the denominator squared. Jumping from 95% to 99% confidence at e = 5% and p = 0.5 uses z = 2.575829 and yields n0 ≈ 663.6, so n = 664.

Mean formula

For a continuous outcome, e = z σ / √n rearranges to n = (z σ / e)². σ and e must share units. If you want the mean commute within ±2 minutes and a pilot SD is 12 minutes at 95%, n0 = (1.959964 × 12 / 2)² ≈ 138.3, so n = 139 before any FPC. Estimating σ is the hard part; this page will not invent it.

Finite Population Correction - When N Matters

Sampling without replacement from a list of N employees, N students, or N customers reduces variance relative to an infinite superpopulation. The usual correction is n = n0 / (1 + (n0 − 1)/N), sometimes written with n0/N in the denominator. If N is millions and n0 is hundreds, the factor is essentially 1. If you survey a firm of 900 people with the 385 infinite-population plan, FPC drops n to ceil(385 / (1 + 384/900)) ≈ 269.

If the corrected n would exceed N, you are asking for more precision than a census of the finite list can give under the same Wald model; this calculator then caps n at N. Leave N blank unless you truly have a closed list and will sample without replacement. Applying FPC to “US adults” is a category error - that N is not a sampling frame you exhaust.

Sample Size Versus Statistical Power

Confidence-interval sample size and hypothesis-test power are cousins, not twins. Interval sizing fixes z (from 1 − α) and a margin e around one parameter. Power analysis for two groups also needs the difference you care about detecting and the Type II error you will tolerate. A study can have n = 385 per a survey calculator and still be underpowered to compare two conversion rates that differ by one percentage point.

Sequential testing, multiple endpoints, cluster intra-correlation, and finite-sample exact intervals (Wilson, Agresti–Coull) all change the n you should actually field. This page stays with the textbook Cochran / Wald planning formula because that is what people type into a search box. If a reviewer asks for 80% power at a 5% two-sided test of two proportions, you need a different worksheet.

After data exist, convert an observation to a z and an interval with the z-score calculator and confidence interval calculator. Summarize the raw list with the statistics calculator. Those tools analyze numbers you already collected; this one only plans how many to collect under SRS assumptions.

Practical Survey Pitfalls That 385 Does Not Fix

Coverage error (your frame misses people), measurement error (a badly worded item), and nonresponse bias can dwarf a 5% sampling margin. A volunteer web form with 385 answers is not a probability sample. Weighting, quotas, and mixed-mode follow-up are design choices layered on top of n, not substitutes for it.

Design effect: a cluster sample of classrooms often behaves like a smaller effective n. If DEFF ≈ 1.5, you may need about 1.5 × 385 completed questionnaires to match the SRS margin of error. This calculator does not apply a design effect; multiply n yourself if your statistician quotes one.

Subgroups: 385 is for one overall proportion. If you also need ±5% for women and for men separately, each subgroup needs its own n, which can more than double the field effort. Plan the smallest cell you will actually report, not only the headline.

Confidence Level Is Not “95% of People Agree,” and Other Misreadings

A 95% confidence level describes a long-run property of the interval recipe, not the chance that this week’s poll is right. If you repeated the survey many times from the same frame, about 95% of the Wald intervals would cover the true proportion (under the model). It does not mean 95% of respondents share an opinion, and it does not mean there is only a 5% chance the truth lies outside ±5 points for this particular sample. Bayesian credible intervals answer a different question and need a prior; they are not computed here.

Margin of error on a proportion is in percentage points of the same 0–100 scale as the estimate. A 5% margin around an estimated 52% yes is 52% ± 5 points (roughly 47% to 57%), not 5% of 52%. Typing e = 5 in proportion mode is that percentage-point half-width. In mean mode, e is in the units of the measurement: ±2 kg is e = 2, not 2%.

Response rate is a field multiplier, not a substitute for n. If you need 385 completes and history says 25% of emails yield a complete, you send on the order of 385 / 0.25 = 1,540 invitations, then hope the nonrespondents look like the respondents - which they often do not. Increasing n cannot fix a biased frame. A river-sample of website visitors with 2,000 answers can be worse than a well-drawn 385.

More Worked Planning Numbers (90%, 99%, Tight Error, Known p)

90% confidence, e = 5%, p = 0.5, infinite population: z = 1.644853, n0 = (1.644853)² × 0.25 / 0.0025 ≈ 270.6, so n = 271. Dropping from 95% to 90% saves more than a hundred interviews if a stakeholder will accept the weaker coverage statement.

99% confidence, e = 5%, p = 0.5: z = 2.575829, n0 ≈ 663.6, n = 664. That is the cost of a tighter confidence statement at the same margin. Conversely, keep 95% and shrink e to 4% (e = 0.04): n0 ≈ 600.2, n = 601. Shrink e to 3%: n0 ≈ 1,067.1, n = 1,068 with this z (pollsters often quote 1,067 using z = 1.96 exactly).

Known p away from one half: 95%, e = 5%, p = 0.1. Then p(1−p) = 0.09, n0 = 3.84146 × 0.09 / 0.0025 ≈ 138.3, n = 139. That is why a rare-event prevalence study can be smaller if you trust the 10% planning value - and disastrously too small if the true p is actually 50%. When in doubt, stay at 0.5.

Finite list of 2,500 customers, 95%, 5%, p = 0.5: n0 ≈ 384.15, FPC n = 384.15 / (1 + 383.15/2500) ≈ 332.3, ceil 333. The same inputs with N = 500: adjusted n = 384.15 / (1 + 383.15/500) ≈ 217.4, ceil 218. Below a few thousand listed units, ignoring FPC wastes interviews.

Mean mode check: 95%, σ = 15 points on a test, e = 3 points. n0 = (1.959964 × 15 / 3)² ≈ 96.0, n = 96. If the class has only N = 120 students and you sample without replacement, FPC yields n = 96 / (1 + 95/120) ≈ 53.6, ceil 54. That is how a census of a small course can need far fewer than the infinite-population formula.

Clustering and stratification change n after this formula, they do not replace it. A stratified sample that guarantees 200 completes in each of four regions is a quota of 800, not 385, even if the national margin of error would have been 5% at 385. A two-stage cluster of schools then classrooms inflates variance; multiply n by a design effect your methodologist estimates from ICC. This page will not invent DEFF = 1.3 for you.

After you field the survey, the realized margin of error depends on the observed p̂, not the planning p. If you planned at p = 0.5 and observed 12% yes, the Wald half-width z √(0.12×0.88/n) is smaller than 5% for the same n. Report the interval you actually earned. Planning n is a budget; the interval is a result. Pair them with the confidence interval calculator once the counts exist.

Frequently Asked Questions (FAQ) - Sample Size

How do I find the sample size for a survey?

For a simple random sample of a proportion, use n0 = z² p (1−p) / e², then round up. z comes from the confidence level (1.959964 at 95%), e is the margin of error as a decimal (5% → 0.05), and p is the expected proportion. If you have no better guess, p = 0.5 gives the largest n. This page ceilings the result, so 95% / 5% / p = 0.5 on an infinite population returns n = 385.

Why is the estimated proportion p defaulted to 0.5?

The product p(1−p) is maximized at p = 0.5. That is the most conservative planning value: it produces the largest sample size for a given z and e. If a pilot study already shows p near 0.1 or 0.9, you can enter that estimate and n will drop. Using 0.5 when you truly know p is more extreme overstates how many responses you need, which is safer than undersampling.

Why does 95% confidence and 5% margin of error give n = 385?

Plug in z = 1.959964, p = 0.5, and e = 0.05: n0 = (1.959964)² × 0.25 / 0.0025 ≈ 384.15, then ceiling to 385. Many textbooks use z = 1.96 and quote 385 as well. This is the infinite-population Cochran formula, not a finite-population correction and not a two-sample power calculation.

What is the finite population correction (FPC)?

When you sample without replacement from a known population of size N, the usual n0 slightly overstates the needed sample. The FPC is n = n0 / (1 + (n0−1)/N). If N is huge compared with n0, the correction barely changes n. If N is only a few thousand, n can drop a lot. Leave N blank here to treat the population as infinite.

Is sample size the same as statistical power?

No. This calculator sizes a simple random sample so a single proportion or mean has a stated margin of error at a stated confidence level. A power analysis for an RCT or two-sample test also needs alpha, beta (1−power), and an effect size. Those designs are not what this page computes. Do not treat n = 385 as the sample size for a clinical trial.

Does this sample size calculator upload my numbers?

No. The formula runs in your browser with JavaScript. Confidence level, margin of error, p, σ, and N never leave the device. After the page loads, the tool still works if the network drops. Inputs are stored only in localStorage on your computer for up to 30 days.

Why Use This Free Sample Size Calculator?

  • n = 385 at the standard 95% / 5% / p = 0.5 infinite-population setting, with z = 1.959964 not a sloppy 2.
  • Honest scope: SRS proportion or mean, plus optional FPC - not two-sample power.
  • Private. Planning numbers never leave the browser.
  • Copy, clear, fullscreen, and a resizable split on desktop.