easyonlinecalculator

Sample Size Calculator

Enter your confidence level and margin of error to find the sample size a survey needs. Choose a proportion (a percentage of yes answers) or a mean (an average), and add a population size if the group you study is small.

Last updated November 4, 2026

Overrides the level above. Must be above 50 and below 100.

50% is the safest choice and gives the largest sample.

Leave blank for a very large or unknown population.

Result

Sample size needed: 385

Sample size calculator results
ResultValue
Required sample size385
Critical value z1.96
Sample size before rounding384.15

Assumes a simple random sample, independent answers and an approximately normal estimate. Non-response is not included: divide by your expected response rate to plan invitations.

Show the work

Formula: n0 = z² × p × (1 - p) ÷ e²; round up

  1. Critical value for 95% confidence (two-sided): z = 1.96.
  2. n0 = 1.96² × 0.5 × 0.5 ÷ 0.05² = 384.15.
  3. Round up to a whole person: 384.15 becomes 385.

Result: Sample size: 385 (95% confidence, 5% margin of error, expected proportion 50%, large population). Always rounded up.

The sample size formulas

Formula

n0 = z² × p × (1 - p) ÷ e² or n0 = (z × σ ÷ e)²

For a proportion, z is the critical value for your confidence level, p is the expected share (use 0.5 if you do not know), and e is the margin of error as a decimal, so 5% is 0.05. For a mean, σ is the standard deviation of the thing you measure and e is the margin in the same units. The calculator finds z from the normal distribution for the two-sided confidence level, for example 1.96 at 95%.

If the population is small, the finite population correction lowers the need: n = n0 ÷ (1 + (n0 - 1) ÷ N), where N is the population size. The result is always rounded up to the next whole person, because rounding down would give a margin of error larger than the one you asked for. The sample never exceeds the population.

See how we calculate for the formulas, sources and review schedule behind every calculator.

Also useful alongside this calculator: Probability Calculator, Z-Score Calculator and Statistics Calculator.

Choosing confidence and margin of error

The confidence level says how often the method captures the true value over many repeated samples. 95% is the usual default. The margin of error is the plus or minus range you accept around the result. Both choices cost respondents. For a large population and p = 0.5, 90% confidence with a 5% margin needs 271 people, 95% needs 385 and 99% needs 664. Halving the margin of error roughly quadruples the sample: 95% with a 5% margin needs 385, with 2.5% it needs 1,537.

Why 50% is the safe default for a proportion

The product p × (1 - p) is largest at p = 0.5, so assuming 50% gives the biggest, most cautious sample. If earlier research suggests a share near 20%, using it cuts the need: at 95% confidence and a 5% margin, p = 0.2 needs 246 people instead of 385. Use a lower value only when you have a trustworthy estimate.

Small populations

For a very large population the size hardly matters, which is why national polls survey about the same number of people as city polls. For a small group the correction matters. At 95% confidence and a 5% margin, a population of 10,000 needs 370, a population of 1,000 needs 278 and a population of 500 needs 218.

What the calculator assumes

It assumes a simple random sample, where everyone has an equal chance of selection and answers independently, and that the estimate is approximately normal. It does not include non-response: if you expect 40% of invitees to answer, divide the sample size by 0.4 to find how many to invite. It also does not cover stratified or cluster designs, or tests that compare two groups.

How to use the Sample Size Calculator

  1. Choose whether you are estimating a proportion or a mean.
  2. Select the confidence level, or type a custom one between 50 and 100.
  3. Enter the margin of error and the expected proportion, or the standard deviation and margin for a mean.
  4. Add the population size if it is small, then read the sample size, open Show the work, and Copy, Print or Share.

Worked example

Worked example

You want to estimate a proportion within 5 percentage points at 95% confidence and know nothing about the true share. z = 1.96 and p = 0.5, so n0 = 1.96² × 0.25 ÷ 0.05² = 384.15. Rounded up, you need 385 people for a very large population.

Proportion, p = 0.5, large population
ConfidenceMargin of errorSample size
90%5%271
95%5%385
95%3%1,068
99%3%1,844
95%1%9,604

Frequently asked questions

What sample size do I need for 95% confidence and a 5% margin of error?

For a large population and an unknown proportion, you need 385 people. A population of 10,000 needs 370, because the finite population correction lowers the number slightly.

Why does the calculator always round up?

The formula gives a minimum. Rounding 384.15 down to 384 would leave the margin of error slightly above what you chose, so the result is always rounded up to a whole person.

What standard deviation should I use for a mean?

Use an estimate from a pilot study, earlier research or a published range. A larger standard deviation needs a larger sample. With σ = 15 and a margin of 2 at 95% confidence you need 217 people.

Does the result account for people who do not respond?

No. It gives the number of completed responses. Divide it by your expected response rate to find how many people to invite, for example 385 ÷ 0.5 = 770.