Sample Size Calculator - Survey & Study Size Formula

What are you measuring?

%

How far off the true value you can live with.

%

Leave at 50% if you have no prior estimate — that is the worst case.

Leave blank for a very large or unknown population.

Response rate 30% · design effect 1.00

Completed responses needed

370

Invitations to send

1,234

after the response rate

Margin of error achieved

±5.00%

at the final sample size

Critical value z

1.9600

two-sided, 95% confidence

Where the number comes from

Statistical minimum n₀385

infinite population, no field losses

Completed responses needed370

finite population correction for N = 10,000

Invitations at 30% response1,234

people you must contact

Sample size at other margins of error

PrecisionResponsesInvitationsRelative cost
±10%96320
±5%3701,234
±4%5671,890
±3%9653,217
±2%1,9376,457
±1%4,90016,334

Sample size scales with 1/e², so halving the margin of error quadruples the sample. The finite population correction damps that growth in the rows above — the smaller the population, the flatter the cost curve.

How to Use This Calculator

  1. Pick the tab that matches your question: Percentage for “what share will say yes”, Average for a mean value, Compare 2 groups for an A/B test.
  2. Set the margin of error you can live with. ±5 percentage points is the survey default; ±3 is newsroom-grade and costs almost three times as much.
  3. Choose a confidence level. Leave it at 95% unless a regulator or journal says otherwise.
  4. Enter the expected result (or the standard deviation in Average mode). If you have no prior estimate, 50% is the safest guess because it needs the largest sample.
  5. Add your population size only when the group is genuinely finite — a 400-person company, a 12,000-member association. Blank means “effectively unlimited”.
  6. Open Field adjustments and enter your real response rate. That is the number that turns 385 responses into 1,284 invitations.

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

Sample Size Calculator: How Many Responses You Actually Need

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:Updated:
Sample Size Calculator illustration showing a highlighted subset of a large population crowd used to estimate the whole group

A sample size calculator takes three decisions and turns them into a single integer: how much error you will tolerate, how confident you want to be, and roughly what you expect to find. For a general population survey at ±5% and 95% confidence, that integer is 385. It is 385 for a town of five million and 385 for a country of three hundred million, which is the part almost nobody believes the first time they see it.

The interesting work isn’t the formula. It’s everything that happens after it: the design effect, the finite population correction, and the response rate that quietly turns 385 into 1,284 invitations. Below is where each number comes from and how much each one costs.

Why 385 Is the Answer to So Many Survey Questions

Cochran’s formula for a proportion is short: n₀ = z² × p(1 − p) / e². Here z is the critical value for your confidence level, p is the proportion you expect, and e is the margin of error written as a decimal. At 95% confidence z = 1.96, and if you have no idea what p will be you use 0.5. Plug them in with e = 0.05 and you get 384.16, which rounds up to 385.

Why 0.5? Because p(1 − p) is a parabola that peaks exactly there. Any other guess needs a smaller sample, so 50% is the honest worst case — you can never be caught short by using it. The critical value comes from the standard normal curve; if you want to see where 1.96 lives on that curve, the z-score calculator shows the tail areas directly.

Required sample at ±5%, 95% confidence, unlimited population
Expected result pp(1 − p)Sample needed
50%0.2500385
40% or 60%0.2400369
30% or 70%0.2100323
20% or 80%0.1600246
10% or 90%0.0900139
5% or 95%0.047573

Notice how flat the top of that table is. Moving your assumption from 50% to 40% saves you 16 responses out of 385 — about 4%. Guessing p wrong is cheap. Guessing e wrong is not, which is the next section.

Halving the Margin of Error Costs Four Times the Sample

The margin of error sits in the denominator squared. That one exponent drives most of the budget in real research. Halve e and you multiply n by four. Cut it to a fifth and you multiply n by twenty-five.

p = 50%, 95% confidence, unlimited population
Margin of errorSample neededCost vs ±5%
±10%970.25×
±5%385
±3%1,0682.8×
±2%2,4016.2×
±1%9,60425×

This is why almost every published poll lands on ±3% with about 1,000 respondents. It’s the last point on the curve where precision is still affordable. Once you have collected your data and want to run the relationship backwards — given the n I actually got, how wide is my error bar? — that’s the job of the margin of error calculator, which solves the same equation for e instead of n.

When Population Size Actually Changes the Answer

Everyone expects a bigger population to need a bigger sample. It doesn’t — it needs a slightly smaller one, and only when the population is small enough to notice. The finite population correction is n = n₀ / (1 + (n₀ − 1) / N), where N is the size of the group you are sampling from.

±5%, 95% confidence, p = 50%, so n₀ = 384
Population NSample neededShare of population
1008080%
50021844%
1,00027828%
10,0003703.7%
100,0003830.38%
1,000,0003840.04%

A useful shortcut: once N is more than about twenty times n₀, the correction shaves off less than 5% and you can safely ignore it. Below that it matters a lot. Surveying a 100-person company at ±5% means reaching 80 of them — a census in all but name, and usually the moment to widen the margin of error instead.

Measuring an Average Instead of a Percentage

Continuous outcomes — test scores, wait times, blood pressure — use a different formula: n = (zσ / e)². The structure is identical, but p(1 − p) is replaced by the actual variance, so you need σ before you start.

Say you want a class’s mean exam score to within ±2 points at 95% confidence, and past cohorts had a standard deviation of 15. Then n = (1.96 × 15 / 2)² = 14.7² = 216.09, so you need 217 papers. Tighten it to ±1 point and you need 865. Same quadratic law, same brutal arithmetic.

The obvious objection is that you can’t know σ before collecting data. Three ways out, in order of preference: use historical data from the same instrument, run a pilot of 30–50 and compute s with the sample standard deviation calculator, or fall back on the range rule and set σ ≈ (max − min) / 4. The range rule is crude, and it usually overestimates, which at least errs toward a bigger sample. Once the data is in, the standard error calculator tells you what precision you actually bought. The NIST/SEMATECH e-Handbook walks through the same derivation with the tolerance-interval variants.

One caveat the formula hides: it assumes z, which is a large-sample approximation. Under about n = 30 the t-distribution is meaningfully wider, and the honest fix is to add roughly 5% and re-check.

Estimating a Number vs Detecting a Difference

These are not the same question, and mixing them up is the single most expensive mistake in the whole topic. Estimating asks “what is the value, give or take?” Detecting asks “is B genuinely better than A?” The second needs a second knob — power, the probability of spotting the effect if it is really there — and a much larger sample:

n per group = (zα/2 + zβ)² × [p₁(1 − p₁) + p₂(1 − p₂)] / (p₁ − p₂)²

Take a checkout page converting at 10%. You want to know whether a redesign lifts it to 12% — a 20% relative improvement, which most teams would call a big win. At 95% confidence and 80% power that needs 3,839 visitors per group, 7,678 in total. Now look at what happens when the effect you care about gets smaller:

Baseline 10%, 95% confidence, 80% power
Improvement to detectNew ratePer group
+50% relative15%683
+20% relative12%3,839
+10% relative11%14,749

Chasing a 10% lift instead of a 50% one costs twenty-one times the traffic. That ratio is why so many A/B tests are called early and wrong: the team had enough traffic to detect a landslide and ran it hoping to detect a nudge. Both z values in that formula come from the same normal curve, and the normal distribution calculator will give you zβ for any power you like.

The Multiplier That Wrecks Field Budgets

Every number so far describes completed, usable responses. Nobody gets those at a 1:1 rate. Email surveys run 10–25%, phone surveys are often under 10%, and a well-targeted internal staff survey might hit 60%. Divide, don’t hope:

Invitations needed for 385 completed responses
Response rateInvitationsTypical channel
60%642internal staff survey
30%1,284customer list, incentivised
20%1,925cold email
5%7,700unsolicited phone

Then there is the design effect. If you sample clusters — schools, villages, city blocks — the people inside a cluster resemble each other, so each response carries less independent information. Household surveys typically use a DEFF between 1.5 and 3, and you multiply your sample by it. Stack the two effects together: a DEFF of 2 turns 385 into 769 completed interviews, and at a 25% response rate that is 3,076 households to approach. Eight times the number most people quote from memory, which is exactly why field budgets blow up.

Five Ways the Number Comes Out Wrong

  • Applying the margin to subgroups. A national sample of 1,000 has ±3.1% overall. Slice out 40 respondents aged 18–24 and that subgroup carries ±15.5%. Plan the sample around the smallest group you intend to report, not the total.
  • Rounding down. 384.16 becomes 385, never 384. Always round up; the formula gives a minimum.
  • Believing the margin covers every error. It covers sampling error only. Bad question wording, a frame that misses half the population, and people who refuse to answer are all invisible to it.
  • Reading 95% confidence as “95% chance the answer is right”. It means that if you repeated the whole study many times, 95% of the intervals built this way would contain the true value. The confidence interval calculator makes the distinction concrete once you have real data.
  • Recalculating n after the fact. Plugging the observed p back in to justify the sample you happened to get is post-hoc reasoning. Fix the target before collection, then report what you achieved.

Ten Million Ballots: What a Sample Size Calculator Can’t Fix

In 1936 the Literary Digest mailed out ten million ballots and got 2.4 million back. It predicted Alf Landon would beat Franklin Roosevelt in a landslide. Roosevelt won 46 of 48 states. George Gallup, working with roughly 50,000 interviews — one fiftieth of the sample — called it correctly, because his list wasn’t drawn from car registrations and telephone directories during the Depression.

That’s the ceiling on everything above. A sample size calculator tells you how many people you need if they are drawn at random from the group you want to describe. It cannot repair a biased frame, and adding respondents to a biased sample just makes you more precisely wrong. Get the sampling frame right first, then use the number the calculator gives you — and when your real constraint is budget rather than precision, run it backwards: enter the sample you can afford and read the margin of error you will have to live with.

Frequently Asked Questions

Still Have Questions?

The detailed content on this page provides comprehensive explanations and examples to help you understand better.