Study and Productivity

How Big Should My Sample Be? Margin of Error and Power Explained

How to calculate sample size for surveys and experiments, why 385 respondents give ±5 %, the finite population correction, statistical power and dropouts.

Saizul Amin
Saizul Amin30 Oct 2026 · 3 min read
How Big Should My Sample Be? Margin of Error and Power Explained

How Big Should My Sample Be? Margin of Error and Power Explained

Before collecting data, every researcher faces the same question: how many? Too few observations give vague results or miss real effects; too many waste money and participants' time. This guide explains the main sample size formulas for surveys and comparative studies, and you can calculate them with the sample size calculator.

Surveys: estimating a proportion

To estimate a percentage, such as the share of voters supporting a policy, within a margin of error E at a given confidence level:

n = z² × p × (1 − p) / E².

  • z is 1.645 for 90 %, 1.96 for 95 % and 2.576 for 99 % confidence.
  • p is the expected proportion. If unknown, use 0.5, which gives the largest and safest n.

At 95 % confidence and p = 0.5:

Margin of errorSample size
±10 %97
±5 %385
±3 %1,068
±2 %2,401
±1 %9,604

Halving the margin quadruples the sample.

Small populations

When the sample is a sizeable fraction of the population, apply the finite population correction:

n' = n / (1 + (n − 1) / N).

A company with 1,000 employees needs 278 responses, not 385, for ±5 %. For populations above about 20,000 the correction hardly matters, which is why national polls of about 1,000 people achieve ±3 % whatever the country's size.

Estimating a mean

n = (z σ / E)². To estimate an average within ±2 units when the SD is about 10, you need 97 observations at 95 % confidence. The SD comes from a pilot study or earlier research.

Comparing two groups: power

For experiments comparing two groups, two errors matter:

  • Type I error (α): finding a difference that is not there, usually 5 %.
  • Type II error (β): missing a real difference. Power = 1 − β, usually 80 or 90 %.

For two means, each group needs:

n = 2 (z₁₋α/₂ + z₁₋β)² σ² / Δ²,

where Δ is the smallest difference worth detecting. With σ = 10, Δ = 5, α = 0.05 and 80 % power, that is 63 per group. For 90 % power, 85 per group.

For two proportions, detecting an improvement from 30 % to 45 % with 80 % power needs about 163 per group.

Choosing the effect size

The smallest difference worth detecting is a scientific or practical decision, not a statistical one. Too optimistic a Δ leads to underpowered studies that often fail to find real but modest effects.

The margin of error you have

If your sample is fixed, compute its precision: E = z √(p(1 − p) / n). A survey of 400 people has a margin of about ±4.9 % at 95 % confidence.

Response rates and dropouts

Plan for losses. If you expect 40 % of invitations to be answered, invite n / 0.4 people. In clinical trials, add 10 to 20 % for dropouts.

Bias cannot be fixed by size

A large sample from a biased frame, such as an online poll of volunteers, can be precisely wrong. Random selection matters more than size.

Using the calculator

  1. Choose the confidence level.
  2. Enter the expected proportion, margin of error and population size.
  3. Enter SD, margin, power and differences for means and two-group designs.
  4. Enter the sample you have for its margin of error.
  5. Read all sample sizes and the table by margin.

Unequal groups

If groups have different sizes, the total sample needed grows. A 2:1 allocation needs about 12 % more participants in total than equal groups for the same power.

Limits

The formulas assume simple random sampling. Cluster and stratified designs need a design effect, and complex trials need specialist advice.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages