Survey Sample Size Calculator
Operator: Abdulla Al Fahad. How tools are built and checked
Before a survey goes out, three questions decide whether it is worth sending: how precise do the results need to be, how sure do you want to be, and how many people have to answer to get there. This calculator shows the arithmetic that survey platforms hide behind a single box. You enter a margin of error, a confidence level, an expected proportion and, if the group is small, the population, and it returns the number of completed responses with every intermediate figure written out.
It also covers the questions that come right after. If you already have 400 responses, what is your margin of error? If only one in five invitees answers, how many must you invite? If your population is made of regions or segments, how many responses should each one contribute? The last of these, stratified allocation, takes a pasted table of strata and applies proportional or Neyman allocation. It does not draw the sample, design the questionnaire or correct for bias in who responds, which no sample-size formula can do. It also differs from the A/B Test Significance Calculator, whose planner sizes conversion experiments between variants, and from Survey Crosstab, which analyses answers you have already collected; this page works out how many answers to collect.
Key features
- Cochran sample size with finite population correction and design effect, shown as numbered steps
- Confidence levels from 80 to 99 percent using exact normal quantiles, not a rounded z table
- Reverse calculator: margin of error, standard error and effective sample size from your completed responses
- Invitations needed from completes, response rate and qualifying share
- A curve of required responses against margin of error, with your choice marked
- Proportional and Neyman (optimum) allocation, with optional cost weights and a minimum per stratum
- Strata that would need more than their population are fixed as a census and the surplus is re-spread
- Overall margin of error for the stratified design beside the margin for a simple random sample of the same size
The formulas behind each number, step by step
The shared inputs are the confidence level (80, 85, 90, 95 or 99 percent), the expected proportion, the population size and the design effect. The expected proportion is the share of respondents you expect to give the answer you care about. Leave it at 50 percent unless earlier data supports another value: 50 percent maximises p times (1 minus p) and therefore gives the largest, safest sample size. Population can be left blank for a large or unknown group; the finite population correction only starts to matter once the sample is more than about five percent of the population. The design effect is 1 for a simple random sample and rises for clustered or weighted designs; values from 1 to 10 are accepted.
The margin of error field takes the plus-or-minus value in percentage points, from 0.05 up to 50. The reverse calculator takes a number of completed responses, whole, at least 2, and no more than the population when one is given. The invitation planner takes an expected response rate and the share of respondents who qualify (use 100 if you have no screening question).
Strata go in a text box, one per line, as name, population, expected value and an optional relative cost, separated by commas, semicolons or tabs. A header line is skipped. The expected value is the stratum's expected proportion (30%, or 0.3) when the measure is a yes/no question, or its standard deviation when the measure is a numeric question such as spend. Names must be unique, populations whole numbers above zero, and up to 500 strata are accepted. The allocation can be downloaded as a CSV.
How it works
The starting point is Cochran's formula for a proportion: n0 equals z squared times p times (1 minus p), divided by the margin of error squared. For 95 percent confidence z is 1.95996, so with p of 0.5 and a 5 point margin n0 is 1.95996 squared times 0.25 over 0.0025, which is 384.15, and the answer rounds up to 385. For a finite population N the corrected size is n0 divided by (1 plus (n0 minus 1) over N). With N of 1,000 that is 384.15 over 1.38315, or 277.73, which rounds up to 278.
The unrounded n0 is used inside the correction and only the final figure is rounded up. Some calculators round n0 to 385 first and then correct it, which gives 279 for N of 1,000. The difference is one response, but this version matches the formula as written. The design effect then multiplies the corrected size and the result is capped at the population: if the formula asks for everyone, the tool says to survey everyone.
The reverse formula is the margin of error equals z times the square root of (design effect times p times (1 minus p) over n times the population factor (N minus n) over (N minus 1)). Completes at 20 percent response need invitations equal to completes over (0.20 times the qualifying share), rounded up, so 385 completes need 1,925 invitations and 278 need 1,390.
Proportional allocation gives stratum h a share n times N_h over N. Neyman allocation gives n_h proportional to N_h times S_h over the square root of the cost c_h, where S_h is the square root of p(1 minus p) for a proportion or the standard deviation you entered. It puts more of the sample where the stratum is big or variable and less where interviews are expensive. Any stratum whose share exceeds its population is fixed at a census and the leftover sample is re-spread; any stratum below the minimum you set is lifted to it.
When to use it
- Sizing an employee engagement survey for a company of 1,000 staff where a census is not needed
- Planning a customer satisfaction study and working out how many email invitations to send at a realistic response rate
- Splitting a regional poll so every region has enough responses to be reported on its own
- Justifying a budget: showing that moving from plus or minus 5 to plus or minus 3 points raises the requirement from 385 to 1,068
Inputs
- Choose the confidence level and the expected proportion, then enter the population if it is small enough for the correction to matter.
- Type the margin of error you can accept and read the number of completes, with the formula steps beneath it.
- Enter your expected response rate to see how many invitations to send, and use the curve to see what a looser margin would save.
- If you already have responses, type the count in the reverse calculator to see the margin you will actually get.
- For a segmented population, paste the strata, pick the method and the total, and download the allocation.
Worked example
95% confidence, plus or minus 5 points, p = 50%, then four regions with a total of 385
region,population,expected_yes,relative_cost
North,4200,30%,1
South,2800,50%,1
West,1500,20%,1
Island,300,50%,1What the page reports
Large population n0 = 1.9600 squared x 0.50 x 0.50 / 0.0500 squared = 384.15 -> 385 completes
N = 1,000 277.73 -> 278 completes; 99% confidence needs 664 (400 for N = 1,000)
Invitations 385 / 0.20 = 1,925
Proportional North 184, South 122, West 66, Island 13 (385); margin +/-4.54%
Neyman North 182, South 132, West 57, Island 14 (385); margin +/-4.52%
Simple random same 385 responses give +/-4.67%Tips for best results
- Look at the curve before settling on a margin. Halving the margin roughly quadruples the responses: 385 at 5 points, 1,068 at 3 and 9,604 at 1, and the extra precision is rarely worth the cost.
- If past data says the answer is lopsided, use it. An expected 10 percent proportion needs 139 completes at 5 points instead of 385, though a wrong guess in the direction of 50 percent leaves you underpowered.
- Set a minimum per stratum when you plan to report on a small group by itself. With Island at 300 people, the Neyman figure of 14 responses would give a margin of about 26 points for that region alone, so lifting it to 30 is often sensible.
- Use the effect of the population on the answer to decide whether to census. For a population of 100 the 95 percent, 5 point answer is 80, which is four-fifths of everyone.
- Add the design effect whenever responses are clustered (schools, stores, households) or heavily weighted. A design effect of 1.5 turns 385 into 577.
Limits
The margin of error describes sampling noise only. A 20 percent response rate that skews toward unhappy or enthusiastic people gives bias that no sample size repairs.
The formula applies to a proportion from a random sample. Quota or opt-in panels have no strict margin of error, and quoting one is an approximation.
Subgroup margins are wider than the overall one. A survey sized for plus or minus 5 points overall has about plus or minus 7 points for a subgroup half that size.
Neyman allocation depends on your guesses of each stratum's variability. Poor guesses can leave it slightly worse than proportional, as can cost weights that favour the cheaper strata at a fixed total.
Common errors and how to fix them
- "The expected proportion must be between 0% and 100%, exclusive"
- Enter the percentage as a plain number such as 50. A value of 0 or 100 would imply zero variance and a sample size of zero.
- "More responses than the population is not possible"
- In the reverse calculator, the number of completes is larger than the population you entered. Lower the number or clear the population field.
- "At least one stratum received no responses"
- The total is too small to give every stratum a response. Raise the total or set a minimum per stratum.
Best practices
- Write down the confidence level, margin, expected proportion and design effect with the result, so the figure can be reproduced.
- Size for the smallest subgroup you intend to report on, not only for the total.
Why 385 is so common, and when it is wrong
385 appears in so many guides because it is the answer to the default question: 95 percent confidence, a 5 point margin and an unknown proportion. It is the most conservative figure for a large population, and it does not depend on how large that population is once it passes about 20,000. For a population of 10,000 the answer is 370, for 1,000 it is 278, for 500 it is 218.
It is wrong whenever those defaults do not describe your survey. A small population shrinks it, a clustered design inflates it, a stricter margin changes it dramatically and a lopsided expected proportion lowers it. It also counts completed, usable responses, so incomplete questionnaires and screen-outs come off the top before you compare against it.
Frequently asked questions
Why does the tool say 278 instead of 279 for a population of 1,000?
It keeps the unrounded n0 of 384.15 inside the finite population correction and rounds up only at the end. Rounding to 385 first, as some online calculators do, and then correcting gives 279.
Does the population size matter for a large group?
Hardly. Beyond about 20,000 the required sample is effectively the same. The correction matters when the sample would be more than roughly 5 percent of the population.
When should I choose Neyman instead of proportional allocation?
When strata differ a lot in variability or in interview cost, and you have reasonable guesses for both. If you know little about them, or want every stratum represented in proportion to its size, proportional allocation is simpler and safe.