The formula, and why the population usually drops out
For a proportion the required sample is n = z squared times p(1 minus p), divided by e squared. The z comes from the confidence level: 1.645 for 90 percent, 1.960 for 95, 2.576 for 99. The p is your best guess at the proportion you are measuring. The e is the margin of error you are willing to accept, as a decimal. At 95 percent with p at 0.5 and e at 0.05 that is 3.8415 times 0.25 divided by 0.0025, which is 384.15, rounded up to 385.
Notice what is not in that expression: the size of the population. The precision of a sample depends on how many people you asked, not on what fraction of the group they represent. Stir a pot and taste one spoonful; the spoonful tells you about the soup whether the pot holds two litres or twenty. This is the least intuitive result in survey sampling, and it is why national polls covering hundreds of millions of people run about a thousand interviews.
When the population does matter
The correction n = n0 divided by (1 + (n0 minus 1) / N) bites only when your sample would be a meaningful fraction of the whole group. Fill the population field in for a genuinely closed list — the 480 people on your payroll, the 2,000 students enrolled — and leave it blank otherwise.
| Population N | Required n at 95%, ±5%, p=0.5 | Share of population |
|---|---|---|
| 100 | 80 | 80% |
| 500 | 218 | 44% |
| 1,000 | 278 | 28% |
| 10,000 | 370 | 3.7% |
| 100,000 | 383 | 0.4% |
| Unlimited | 385 | — |
By 10,000 the correction has saved you 15 responses out of 385. By 100,000 it has saved two. Past that it is noise.
Why 50 percent is the default guess
The quantity p(1 minus p) peaks at 0.25 when p is 0.5 and falls away on both sides. Assuming 50 percent therefore produces the largest sample any answer could require, so whatever the survey comes back with, the margin of error will be no worse than you planned for. If a previous wave put the figure near 10 percent you can use 10, and the requirement drops from 385 to 139 — but if the real figure has drifted toward the middle since then, the margin you actually achieve will be wider than the one you promised.
Halving the error costs four times the sample
| Margin of error | Responses at 95%, p=0.5 |
|---|---|
| ±10 points | 97 |
| ±5 points | 385 |
| ±3 points | 1,068 |
| ±2 points | 2,401 |
| ±1 point | 9,604 |
Because e is squared in the denominator, precision is bought at a quadratic price. That table is the whole argument for deciding up front how precise you need to be. A ±3 point survey costs nearly three times a ±5 point one, and if the decision it feeds would come out the same either way, the extra 683 interviews bought nothing.
Response rate is where budgets go wrong
The sample size counts completed responses, not invitations. At a 20 percent response rate, 385 completions means 1,925 sends. That much is arithmetic. The part that is not arithmetic is that the 80 percent who ignored you are not a random subset of the population — they are systematically busier, less engaged, or less interested in the topic than the people who replied. Non-response bias grows as the response rate falls, and unlike sampling error it appears nowhere in the margin of error you report. A survey with 5,000 responses at a 3 percent response rate can easily be less trustworthy than one with 400 at 60 percent.
What the number does not buy you
Hitting the target n makes the arithmetic of the margin of error valid. It says nothing about whether the question was leading, whether the answer options covered the real range of views, whether the order of items pushed people one way, or whether the frame you sampled from resembles the population you plan to describe. Those failures are invisible to this calculator and are usually larger than the sampling error it reports. Treat the number here as the minimum you need before the statistics mean anything, never as evidence that a survey is sound.
Questions people ask
Why do national polls use about 1,000 people regardless of the country?
Because 1,000 responses give roughly a ±3 point margin of error at 95 percent confidence, and the population barely enters the formula once it is large. Going from 1,000 to 2,000 improves the margin from ±3.1 to ±2.2 points, doubling the fieldwork cost to buy under a point of precision — and in a real poll that point is smaller than the uncertainty introduced by who agreed to answer. A thousand is the point where extra precision stops being worth paying for, not a magic number.
Can I use this for a mean instead of a proportion?
No, this page is built for proportions — the share of people who say yes, click, or prefer option A. Sizing a sample for a mean uses n = (z times s / e) squared, where s is the standard deviation of the thing you are measuring and e is the margin of error in the same units. That requires knowing or estimating the standard deviation in advance, usually from a pilot or from previous data. The standard deviation calculator will give you s from a pilot dataset, and the confidence interval calculator will show you the interval a given sample actually produced.
What if I want to compare two subgroups within the survey?
Size for the subgroup, not the total. If you plan to report on 200 respondents aged under 30 within a 1,000 person survey, the margin of error on that subgroup is governed by 200, not 1,000 — about ±6.9 points rather than ±3.1. Comparing two subgroups is worse again, because both estimates carry error. If subgroup comparisons are the point of the survey, decide the smallest subgroup you need to speak about, size that to your target margin, and let the total fall out of it. Under-sampled subgroups quietly reported alongside the headline figure are one of the most common ways survey writeups mislead.
Does a bigger sample fix a biased one?
No, and this is worth being blunt about. Sampling error shrinks with the square root of n; selection bias does not shrink at all. A poll of 2.4 million people famously called the 1936 US presidential election for the wrong candidate by a landslide margin, because the sample came from telephone and car registration lists during the Depression. Every extra response made the estimate more precisely wrong. If the people answering differ systematically from the people you want to describe, the fix is the sampling frame, not the count.