A university, a timetable, and 8,000 opinions
A university is redrawing its timetable, and the registrar wants to know what students think before the new slots go live. There are 8,000 students. Asking all of them would take weeks and cost a fortune in staff time. Asking 50 would be quick, and nearly useless: 50 voices cannot speak for 8,000. The registrar's question is the one every survey planner asks first. How many answers are enough?
The answer is not a guess, and it is not a fixed share of the population. It comes from four decisions, and one formula. This guide works it through by hand, with the university survey as the running example, and finishes with the spreadsheet check.
Four decisions that set the sample size
Every sample size rests on four choices. Make them first, and the formula does the rest.
First, the margin of error: how close must the answer be? Five points either way is the usual choice for a survey, written as 0.05. A result of 42% then means somewhere from 37% to 47%.
Second, the confidence level: how sure do you want to be? 95% is the standard, the level news polls use. It means the method catches the true value about 95 times in 100.
Third, the proportion you expect. If you have no idea, use 0.5. Half is the cautious choice, because it asks for the largest sample. A solid guess from a pilot or last year's survey lets you ask for less.
Fourth, the population size, and only when it is small enough to count. A town of 8,000 counts. A country of millions does not. The formula below starts without it, and the correction brings it in at the end.
The sample size formula, in three steps
For a survey about a share, the starting figure is n₀ = z² × p × (1 − p) ÷ e². The z comes from the confidence level: 1.96 for 95%. The p is the expected share. The e is the margin as a decimal.
Work the standard setup. At 95% confidence, a five-point margin, and p = 0.5, the arithmetic is 1.96² × 0.5 × 0.5 ÷ 0.05². That is 3.8416 × 0.25, which is 0.9604, divided by 0.0025, which is 384.16. Round up, always up, and the answer is 385 completed responses.
That is where the famous 384 comes from. Textbooks round the same calculation and quote 384, or use z = 2 for a rough version and land on 400. Same formula, slightly different z. The 385 here uses the exact 1.96, so it is the figure to plan from.
Three habits keep this formula honest. Round up, never down: 384.16 people means 385, because 384 people cannot give the margin you asked for. Use p = 0.5 when you genuinely do not know the share: it is the largest the formula can ask for, so it never leaves you short. And remember the answer counts completed responses, not invitations: the invitations come later.
Worked example: 8,000 students, one survey
Back to the registrar. The survey runs at 95% confidence, a five-point margin, and no prior guess about the share, so p = 0.5. The starting figure is 385, the standard answer from the section above.
Now the population enters. 8,000 students is small enough for the finite-population correction to matter, and the correction is n = n₀ ÷ (1 + (n₀ − 1) ÷ N). Put the numbers in: 385 ÷ (1 + 384 ÷ 8000). That is 385 ÷ 1.048, which is 367.37. Round up: 368 students.
The correction saved 17 interviews. Asking 368 of 8,000 gives the same five-point margin as asking 385 of a city of millions. The population barely moved the answer, and that is the normal pattern: precision depends on the absolute count sampled, not the share of the population. The correction only bites when the sample is a visible slice of the whole group.
Population 8,000 students. 95% confidence, five-point margin, p = 0.5. Starting figure n₀ = 384.16, rounded up to 385. Correction: 385 ÷ (1 + 384 ÷ 8000) = 367.37, rounded up to 368. The registrar needs 368 completed questionnaires. The sample size calculator returns the same two figures: 385 uncorrected, 368 corrected.
How the margin moves the sample size
The margin sits under a square in the formula, so it bites hard. Halve the margin and the sample quadruples. That one fact drives most survey budgets, so run the ladder before you promise a tight margin.
At 95% confidence with p = 0.5, an eight-point margin needs 151 responses. Six points need 267. Five points need 385. Two points need 2,401. Moving from five points to two multiplies the fieldwork more than six times, for three extra points of precision.
Before you ask for two points, ask what decision would change between a result of 42% ± 5 points and 42% ± 2 points. Often nothing changes, and the cheaper survey answers the question just as well. Five points is the usual compromise for a reason.
When a pilot shrinks the sample size
A pilot survey, or last year's numbers, can cut the sample by a lot. The formula asks for the largest sample when p = 0.5, because 0.5 × 0.5 = 0.25 is the biggest the p(1 − p) term can get. A share far from half shrinks that term, and the sample with it.
A shop polls 100 customers before a full survey, and 65 of them say they would come back for a loyalty card. Take p = 0.65. Then n₀ = 1.96² × 0.65 × 0.35 ÷ 0.05². That is 3.8416 × 0.2275, which is 0.8740, divided by 0.0025, which is 349.59. Round up: 350 responses, against 385 at p = 0.5.
The saving is real, and so is the risk. Size for 65% and the true share lands near 50% after all, and the margin you actually get widens past five points. Size from a guess only when the guess rests on earlier data, a pilot, or last year's survey. A hunch is no basis for cutting the sample.
Splitting the sample size across groups
The registrar wants the results broken down by campus, so the 368 answers have to be split across three campuses with 4,000, 2,500 and 1,500 students. The fair split is proportional: each campus gives the same share of the sample as it holds of the population.
Main campus holds 4,000 of 8,000 students, half the population, so it gives half the sample: 368 × 0.5 = 184. North campus holds 2,500, which is 31.25%, so 368 × 0.3125 = 115. South campus holds 1,500, which is 18.75%, so 368 × 0.1875 = 69. Add them: 184 + 115 + 69 = 368, the whole sample, split in proportion.
Proportional splitting keeps every campus fairly heard. It does not give each campus the same precision: the south campus result, built on 69 answers, carries a wider margin than the main campus result on 184. If a campus needs its own five-point margin, size that campus separately and add the pieces up.
Surveying for a mean, not a share
Some surveys ask for an average, not a share: average monthly spend, average waiting time, average rating. The formula changes shape, and the same four decisions still drive it.
For a mean, n = (z × σ ÷ E)², where σ is the standard deviation from a pilot or earlier data, and E is the margin in the same units as the answer. A shop wants average monthly spend within $4, at 95% confidence. A pilot of 60 receipts put the standard deviation at $25. Then n = (1.96 × 25 ÷ 4)². That is 12.25², which is 150.06. Round up: 151 customers.
The pilot's standard deviation is doing the work p did for a share. A bigger σ means a wider spread of answers, and a wider spread needs more of them to pin the mean down. No pilot at all, and no earlier data, means guessing σ, and a wrong guess here costs the same way a wrong p does. The confidence interval calculator runs the same arithmetic in reverse, from a sample to its interval.
Invitations, not completes
The formula sizes answers in hand. People do not all answer, so the invitations have to be more than the completes. Divide the completes you need by the response rate you expect.
The registrar needs 368 completed questionnaires. If four in ten students typically reply, that is 368 ÷ 0.40 = 920 invitations. If only a quarter reply, the same 368 completes need 368 ÷ 0.25 = 1,472 invitations.
Send the invitations in waves rather than all at once. The first wave goes to half the list, and the response rate it returns tells you how many more invitations the second wave needs. A survey that mails exactly 368 invitations and gets 147 back has a margin near eight points, not the five it planned for. Work out the completes first, then divide by the response rate you actually expect.
When to survey everyone
Sometimes the correction shrinks the sample so far that sampling stops making sense. A club with 90 members wants the same standard setup: 95% confidence, a five-point margin, p = 0.5. The starting figure is still 385. The correction gives 385 ÷ (1 + 384 ÷ 90), which is 385 ÷ 5.2667, which is 73.10. Round up: 74 members.
Asking 74 of 90 people is nearly a census, and the sixteen you skip save almost nothing. When the corrected figure passes about 80% of the population, stop sampling and ask everyone. The answers are exact, the margin is zero, and nobody can complain their voice was left out.
The same calculation in a spreadsheet
One formula in Excel does the standard setup. In a blank cell, type =CEILING((1.96^2*0.5*(1-0.5))/0.05^2,1) and Excel returns 385. Change the numbers for your own setup: 1.96 is the z value for 95% confidence (use 1.645 for 90%, 2.576 for 99%), 0.5 is your expected proportion, 0.05 is your margin as a decimal. CEILING rounds up, which is the rule for sample sizes.
For a different setup, the same pattern works. At 90% confidence with a four-point margin, =CEILING((1.645^2*0.5*(1-0.5))/0.04^2,1) returns 423. For the finite-population correction, put the uncorrected figure in A1 and the population in A2, then =CEILING(A1/(1+(A1-1)/A2),1). With 385 in A1 and 8000 in A2, it returns 368, the registrar's figure. The sample size calculator on this site runs the same arithmetic, with the z value and the correction handled for you.
Three slips cause nearly every wrong survey sample size. First, rounding down: 384.16 means 385 people, never 384. Second, budgeting invitations as if they were completes: 368 completes at a 40% response rate need 920 invitations, not 368. Third, sizing from a shaky guess about the share: a pilot of 20 people is not a basis for cutting the sample, and neither is a hunch. When in doubt, size at p = 0.5 and let the pilot earn its saving with real data.
That is the whole method. Decide the margin, the level, the share and the population, run the formula, correct for a small population, and divide by the response rate for the invitations. The sample size calculator runs it on your own numbers, the Slovin's formula calculator and the Yamane's formula calculator cover the named shortcuts examiners ask for, and the margin of error calculator checks the margin your finished sample actually bought.
Frequently asked questions
How many people do I need to survey?
For the standard setup, 95% confidence, a five-point margin and p = 0.5, 385 completed responses. With a known population of 8,000, the correction trims that to 368. Tighten the margin to two points and the answer becomes 2,401. The right sample size follows from the precision your decision needs, so set the margin first and let the formula do the rest.
Why do textbooks say 384?
Because 1.96 squared times 0.25, divided by 0.05 squared, is 384.16. Textbooks round to the nearest whole number and quote 384; this guide rounds up to 385, because 384 people cannot give the five-point margin you asked for. Using z = 2 instead of 1.96 gives an even rounder 400.
What if I don't know the population size?
Leave it out. The starting sample size of 385 needs no population at all, and the correction only matters when the population is small enough to count. For a city or a country, the answer stays 385. Enter a population only when the group is modest and you know its size.
How many invitations should I send for my survey?
Divide the completes you need by the response rate you expect. For 368 completes at a 40% response rate, send 920 invitations. At 25% the same 368 completes need 1,472 invitations. Mailing only as many invitations as completes leaves the survey short and the margin wider than planned.
Does a bigger population need a bigger sample size?
Barely. Precision depends on the absolute count sampled, not the share of the population. 385 completes give a five-point margin whether the population is a town or a country; the finite-population correction only trims the figure when the group is small, like 8,000 students needing 368 instead of 385.