How many people should you ask?

Sample size calculator

A sample size calculator finds n = z² × p(1 − p) ÷ E². For a survey at 95% confidence with a ±5% margin of error and p = 50%, that is 1.96² × 0.25 ÷ 0.05² = 384.16, so you need 385 responses; ±3% needs 1068. From a population of 2,000, 323 are enough.

Final Grade Calculator editorial teamUpdated 4 sources

Calculator

Sample size calculator

Percentages or means; optional population size; or the margin of error for your sample

What do you want?

Your numbers

385

responses needed for ±5% at 95% confidence

n₀ = z² × p(1 − p) ÷ E² = 1.959964² × 0.5 × 0.5 ÷ 0.05² = 384.15, rounded up to 385.

Critical value z*
1.96
Before population correction
385
Population size
large / unknown
Expected proportion p
50%
Same settings, other margins
Margin of errorSample size
±1%9,604
±2%2,401
±3%1,068
±5%385
±10%97

How it works. Percentage: n₀ = z² p(1 − p) ÷ E². Mean: n₀ = (zσ ÷ E)². With a known population N: n = n₀ ÷ (1 + (n₀ − 1) ÷ N). Always rounded up.

How to calculate sample size

To calculate the sample size for a percentage, choose a confidence level (which sets z*), the margin of error E you can accept and a guess p of the percentage, then compute n = z*² × p(1 − p) ÷ E² and round up.[1] Rounding is always up, because 384.16 people would leave the margin slightly wider than ±5%.[1] If you have no idea what p will be, use 50%: p(1 − p) is largest there, so the sample is big enough whatever the answer turns out to be.[3]

For an average (a mean), the formula uses the standard deviation σ instead: n = (z* × σ ÷ E)².[2] With σ = 15 and a margin of ±2 at 95% confidence, n = (1.96 × 15 ÷ 2)² = 216.08, so 217 measurements. σ has to come from a pilot study or earlier data; a guess that is too small gives a sample that is too small.

Survey sample size table

The table below is the answer for most surveys and class projects: a large population, p = 50%, three confidence levels.

Responses needed for a percentage (p = 50%, large population)
Margin of error90% confidence95% confidence99% confidence
±1%6,7649,60416,588
±2%1,6912,4014,147
±3%7521,0681,844
±4%4236011,037
±5%271385664
±10%6897166

Halving the margin of error roughly quadruples the sample, because E is squared in the denominator. Going from ±5% to ±2.5% at 95% takes you from 385 to 1537 responses.

Small populations: the finite population correction

When you survey a known, small group, such as the 2,000 students of one school, fewer responses are needed. The corrected size is n = n₀ ÷ (1 + (n₀ − 1) ÷ N), where n₀ is the size for a large population and N is the population size.[4]

Worked example: a school of 2,000 students

Large-population size at 95% and ±5%: n₀ = 384.15 (with the exact z* = 1.959964; 384.16 with z* rounded to 1.96).

Corrected: 384.15 ÷ (1 + 383.15 ÷ 2,000) = 322.39, so survey 323 students.

For a population of 100,000 the correction changes almost nothing (383), which is why national polls do not depend on the size of the country.

Responses, not invitationsThe formula counts completed, usable answers from a random sample. If you expect 1 in 4 people to reply, invite about four times as many, and remember that a large but self-selected sample is still biased.

Margin of error for a sample you already have

Switch the calculator to “margin of error for a sample size” to run the formula backwards: E = z* × √(p(1 − p) ÷ n). A poll of 1,000 people has a margin of about ±3.1% at 95% confidence, which is where the familiar “plus or minus 3 points” comes from. Once the results are in, the confidence interval calculator turns your actual answers into an interval.

Common sample size mistakes

  • Typing the margin as a decimal. The box takes percent: 5 means ±5%.
  • Using the planned p after the fact. The interval you report should use the observed proportion; the planning p only sets the size.
  • Splitting the sample later. If you will report boys and girls separately, each group needs its own sample size.

Related tools: the normal distribution calculator for the z* values behind the formula, the probability calculator and the t-test calculator for comparing groups after you collect the data.

How we check this calculator

Tests reproduce the textbook results: 385 for ±5% at 95% (384.15 with the exact z*, 384.16 with 1.96, both rounded up), 323 for a population of 2,000, 1,068 for ±3%, and ±3.10% for n = 1,000. The calculator never returns more people than the population.

  • 14 November 2026: page and calculator published.

More statistics calculators

Frequently asked questions

What sample size do I need for a survey?

For a large population at 95% confidence and ±5%, 385 completed responses; for ±3%, 1068. Smaller populations need fewer.

What is the sample size formula?

For a percentage, n = z² × p(1 − p) ÷ E²; for a mean, n = (zσ ÷ E)². Round up to a whole number.

Why use 50% as the expected proportion?

p(1 − p) is largest at p = 0.5, so it gives the most conservative (largest) sample when you do not know the answer in advance.

Does population size matter?

Only when it is small. For 2,000 people, 323 instead of 385; for 100,000 or more the difference is a few people.

Sources

  1. Introductory Statistics 2e, 8.3 A Population Proportion · OpenStax, Rice University, 2nd edition, 2023
  2. Introductory Statistics 2e, 8.1 A Single Population Mean using the Normal Distribution · OpenStax, Rice University, 2nd edition, 2023
  3. 7.2.4.2 Sample Sizes Required (proportions) · NIST/SEMATECH e-Handbook of Statistical Methods, 2012 edition (DOI 10.18434/M32189)
  4. Determining Sample Size (Glenn D. Israel), publication PD006 · University of Florida IFAS Extension (EDIS), accessed 2026-11-14