Sample Size Calculator

Find the minimum sample size for a survey from the confidence level, margin of error, expected proportion and optional population size, with every step shown.

Confidence level

The percentage used to determine the confidence interval. Higher confidence needs a larger sample.

The maximum amount of error you are willing to accept, e.g. 5 for ±5 percentage points.

Your estimated share of the population with the characteristic. Use 50 if unsure.

Total people or items in the population. Leave blank for a very large population.

Try
Required sample size385Calculated: 384.15, rounded up to 385.
Confidence level
95%
Z ≈ 1.96
Margin of error
±5%
Expected proportion
50%
Population
Large
Effectively infinite
Initial size n₀ (unrounded)
384.15
Large-population formula
Minimum sample
385
Always rounded up

Step-by-step calculation

  1. Step 1: Convert the percentages to decimals

    Confidence level = 95%

    E = 5% = 0.05

    p = 50% = 0.5, 1 − p = 0.5

  2. Step 2: Find the critical value

    The z-value that leaves 2.5% of the standard normal distribution in each tail.

    Z ≈ 1.959964

  3. Step 3: Initial sample size (large population)

    n₀ = Z² × p × (1 − p) / E²

    n₀ = 1.959964² × 0.5 × 0.5 / 0.05²

    n₀ = 3.841459 × 0.25 / 0.0025

    n₀ ≈ 384.15

  4. Step 4: Round up to a whole number

    The sample size is rounded up so the planned sample does not fall below the calculated requirement.

    ⌈384.1459⌉ = 385

What this result means

Plan for at least 385 completed responses from a random sample. If the true proportion is near 50%, a 95% confidence interval from a sample this size would have a margin of error of about ±5% (percentage points).

This assumes simple random sampling. It does not allow for non-response (invite more people than you need), bias, clustering or weighting.

How the margin of error changes the sample

At 95% confidence, p = 50%. Halving the margin of error roughly quadruples the sample.

  • ±10%97
  • ±5%385 (your setting)
  • ±3%1068
  • ±2%2401
  • ±1%9604
Sensitivity table
Margin of error90% confidence95% confidence99% confidence
±10%6897166
±5%271385 (your settings)664
±3%75210681844
±2%169124014147
±1%6764960416588

Minimum samples for p = 50%, large population; your settings are underlined.

Sample size formulas

n₀ = Z² × p × (1 − p) / E²

n = N × n₀ / (N + n₀ − 1)

Round the final value up to a whole number.

n₀
initial sample size for a large population
Z
critical value: 1.645 (90%), 1.960 (95%), 2.576 (99%)
p
expected proportion as a decimal (30% → 0.30)
E
margin of error as a decimal (5% → 0.05)
N
population size, for the finite population correction

Once the data are in, turn a sample mean into an interval with the Confidence Interval Calculator, measure spread with the Standard Deviation Calculator, or see how critical values relate to the normal curve in the Z-Score Calculator. To express survey counts as shares, use the Percentage Calculator.

A sample size calculator tells you how many responses you need so that a survey estimate is precise enough. At 95% confidence, a ±5% margin of error and an expected proportion of 50%, you need 385 responses from a large population, or 370 from a population of 10,000.

Choose a confidence level (90%, 95%, 99% or custom), enter the margin of error and expected proportion as percentages, and optionally the population size. The calculator shows the required sample (always rounded up), the unrounded value, whether the finite population correction was applied, the full calculation, and how the sample changes with the margin of error and confidence level.

Worked Calculation Examples

ScenarioResultCalculation Step
95% confidence, ±5%, p = 50%, large population385Z ≈ 1.959964, p = 0.5, E = 0.05. n₀ = 1.959964² × 0.5 × 0.5 / 0.05² = 3.841459 × 0.25 / 0.0025 ≈ 384.15. Round up: 385 responses.
95% confidence, ±5%, p = 30%323p × (1 − p) = 0.3 × 0.7 = 0.21 instead of 0.25. n₀ = 3.841459 × 0.21 / 0.0025 ≈ 322.68, rounded up to 323. A proportion further from 50% needs a smaller sample.
95% confidence, ±5%, p = 50%, population 10,000370Initial sample n₀ ≈ 384.15. Finite population correction: n = 10,000 × 384.15 / (10,000 + 384.15 − 1) ≈ 369.97. Round up: 370 responses.
99% confidence, ±5%, p = 50%664Z rises to ≈ 2.575829, so Z² ≈ 6.634897 instead of 3.841459. n₀ = 6.634897 × 0.25 / 0.0025 ≈ 663.49, rounded up to 664: about 1.7 times the 95% sample, because the higher confidence needs a larger critical value.

What Is Sample Size?

Sample size is the number of observations, people, items or responses included in a study or survey. It controls how precise the results are.

Too small, and the estimate may be too imprecise to be useful: a wide margin of error. Appropriately sized, and the estimate has the precision you planned for, under the assumptions of the calculation. Too large, and you spend time and money for precision you do not need.

Sample size is not the same as quality. A large sample chosen in a biased way, such as only the people who answer an online poll, can still give misleading results; a random, well-designed sample matters as much as its size.

How to Calculate Sample Size

1. Choose a confidence level, usually 95%.

2. Choose the margin of error you can accept, such as ±5 percentage points.

3. Estimate the population proportion p; use 50% if you have no prior estimate.

4. Find the critical value Z for the confidence level (1.960 for 95%).

5. Calculate the initial sample size n₀ = Z² × p × (1 − p) / E².

6. If the population size N is known, apply the finite population correction n = N × n₀ / (N + n₀ − 1).

7. Round up to the next whole number.

For 95%, ±5% and p = 50%: n₀ = 1.959964² × 0.5 × 0.5 / 0.05² ≈ 384.15, which rounds up to 385. (Using Z = 1.96 gives 384.16, which also rounds up to 385.)

Why Use 50% for the Expected Proportion?

The formula depends on p through p × (1 − p). That product is largest when p = 0.5: 0.5 × 0.5 = 0.25, compared with 0.3 × 0.7 = 0.21 or 0.1 × 0.9 = 0.09. So p = 50% gives the largest required sample for a given confidence level and margin of error.

When you have no prior estimate, 50% is therefore a conservative planning assumption: the sample will be big enough whatever the true proportion turns out to be. If earlier studies suggest the proportion is around 30%, using 30% gives a smaller sample (323 instead of 385 at 95% and ±5%), but if the true value is closer to 50%, the margin of error will be a little wider than planned.

Confidence Level vs Margin of Error

The confidence level describes how often the interval procedure is intended to capture the true value in repeated sampling: 90%, 95% or 99%. The margin of error is how much sampling error you are willing to tolerate: ±5 percentage points means an estimate of 40% would be reported as 35% to 45%.

Higher confidence means a larger sample: at ±5% and p = 50%, 90% needs 271, 95% needs 385 and 99% needs 664.

A smaller margin of error means a much larger sample, because E is squared in the formula: halving it roughly quadruples the sample. At 95% confidence, ±10% needs 97, ±5% needs 385, ±3% needs 1,068, ±2% needs 2,401 and ±1% needs 9,604.

The two choices together determine the sample size. ±5% at 95% is a common compromise for general surveys.

Finite vs Infinite Population

For a large (effectively infinite) population, use n₀ = Z²p(1 − p) / E². When the population is small and known, each response covers a larger share of it, so fewer are needed. The finite population correction is n = N × n₀ / (N + n₀ − 1).

Example at 95%, ±5%, p = 50% (n₀ ≈ 384.15): a population of 1,000 needs 278 responses, 500 needs 218, and 100 needs 80. Some tables round n₀ up to 385 before applying the correction, which gives slightly larger (still valid) answers, such as 371 instead of 370 for 10,000.

Beyond a few tens of thousands, population size hardly matters: 10,000 needs 370, 100,000 needs 383, 1,000,000 needs 384, and an unlimited population needs 385.

Important Considerations

This calculator estimates the sample size for a single proportion under simple random sampling. It does not automatically account for:

Non-response and attrition: if you expect only 40% of people to respond, invite about 385 ÷ 0.4 ≈ 963 to get 385 completed responses.

Sampling bias: a sample that does not represent the population is not fixed by making it larger.

Complex designs: clustering, stratification and weighting change the effective sample size (the design effect).

Multiple outcomes or subgroups: if you need ±5% within each of several subgroups, each subgroup needs its own sample.

Proportions near 0% or 100%: the normal approximation is less accurate there, and exact methods may be better.

Sample Size vs Statistical Power

This calculator plans a sample to estimate a proportion with a given margin of error. Power analysis answers a different question: how many observations are needed to detect an effect of a given size in a hypothesis test, for example between a treatment and a control group, at a chosen significance level (alpha) and power (often 80%). It depends on the expected effect size and the test used, and needs a different calculation; this calculator does not perform power analysis.

How to Use the Sample Size Calculator

  1. Choose a confidence level: 90%, 95% (the default) or 99%, or enter a custom level.
  2. Enter the margin of error you can accept as a percentage, such as 5 for ±5 percentage points.
  3. Enter the expected proportion, your best guess of the share with the characteristic; use 50% if you have no estimate.
  4. Optionally enter the population size. Leave it blank for a very large population; if you fill it in, the finite population correction is applied.
  5. Read the required sample size, which is always rounded up, and follow the steps, the margin-of-error chart and the sensitivity table.

Frequently Asked Questions

What is a sample size?

The number of people, items or observations included in a study or survey. It determines how precise the estimates are.

How do you calculate sample size?

For a proportion: n₀ = Z² × p × (1 − p) / E², using the critical value Z for your confidence level, the expected proportion p and the margin of error E as decimals. If the population N is known, use n = N × n₀ / (N + n₀ − 1). Then round up.

What sample size do I need for a survey?

It depends on the precision you need. For a large population, 95% confidence and ±5% need 385 responses; ±3% needs 1,068; ±10% needs 97. Add extra invitations to allow for people who will not respond.

What sample size is needed for a 95% confidence level?

At 95% confidence with p = 50% and a large population: 97 for ±10%, 385 for ±5%, 1,068 for ±3%, 2,401 for ±2% and 9,604 for ±1%.

What does margin of error mean?

The maximum sampling error you plan to accept. ±5% means the estimate should be within about 5 percentage points of the true value, at the chosen confidence level and under the calculation's assumptions.

Why is 5% margin of error commonly used?

It is a practical balance: ±5% at 95% confidence needs only about 385 responses, while ±3% needs 1,068 and ±1% needs 9,604. It is a convention, not a rule; choose the precision your decision needs.

Why is 50% used for population proportion?

p × (1 − p) is largest at p = 0.5, so 50% gives the largest, most conservative sample when you have no prior estimate. If you have a reliable estimate, using it gives a smaller sample.

Does a higher confidence level require a larger sample?

Yes, with everything else the same. At ±5% and p = 50%: 271 at 90%, 385 at 95% and 664 at 99%.

Does a smaller margin of error require a larger sample?

Yes, and quickly, because the margin of error is squared: halving it roughly quadruples the sample, from 385 at ±5% to 1,537 at ±2.5%.

What is finite population correction?

An adjustment for small, known populations: n = N × n₀ / (N + n₀ − 1). When the sample is a noticeable share of the population, fewer responses are needed; for 1,000 people, 278 instead of 385.

How does population size affect sample size?

Only noticeably for small populations. At 95% and ±5%: 100 people need 80, 1,000 need 278, 10,000 need 370, and 1,000,000 need 384.

Does a larger population always require a much larger sample?

No. Beyond a few tens of thousands the required sample barely changes and approaches 385 at 95% and ±5%. A survey of a whole country needs about the same sample as one of a large city.

What is the difference between sample size calculation and statistical power?

This calculation plans the precision of an estimate (a margin of error). Power analysis plans a hypothesis test: the sample needed to detect a given effect size with a chosen alpha and power. They use different formulas; this calculator does not do power analysis.

Last updated: September 27, 2026.