Sample size calculator

This sample size calculator tells you how many respondents a survey needs, based on confidence level, margin of error and expected proportion. At 95% confidence, a ±5 percentage point margin and a 50% proportion the answer is 385; a table also shows other margins.

Example: What do you want to calculate: Sample size for a proportion (yes/no questions) · Confidence level: 95% (common) · Desired margin of error (±) 5 % · Expected proportion 50 % · Population size (0 = very large or unknown) 0 → Required sample size: 385 respondents. Source: Wikipedia – Sample size determination (Cochran’s formula for proportions and means). Updated: .

%
Percentage points by which the result may be off at most.
%
50% is the most cautious assumption and gives the largest sample.
For small populations, such as 500 employees, the required sample shrinks.
My ToolboxYour inputs are saved in this browser only.

Result

Required sample size
385 respondents
Without correction
Very large or unknown population – no correction needed.
Formula
n₀ = z² · p · (1 − p) ÷ e² with z = 1.96, p = 50%, e = 5%
Other margins of error
Margin of errorSample n
± 1 %9,604
± 2 %2,401
± 3 %1,068
± 4 %601
± 5 %385
± 7.5 %171
± 10 %97

How it is calculated

How to calculate sample size

For a proportion (for example “how many are satisfied?”) Cochran’s formula applies: n₀ = z² · p · (1 − p) ÷ e². Here z is the normal-distribution value for the confidence level (1.96 at 95%), p is the expected proportion and e is the margin of error. With p = 50% and e = 5% you get 1.96² · 0.25 ÷ 0.05² = 384.16, rounded up to 385.

Small populations

If the population N is limited, the requirement shrinks: n = n₀ ÷ (1 + (n₀ − 1) ÷ N). With N = 10,000 you need 370 instead of 385 respondents, and with N = 500 only 218.

Means

For a mean, such as average height, p · (1 − p) is replaced by the variance: n₀ = (z · σ ÷ e)². The standard deviation σ has to be estimated from a pilot study or experience.

Margin of error from a sample

The other way round, the calculator shows how precise 400 answers are: e = z · √(p · (1 − p) ÷ n) ≈ ±4.9 percentage points at 95% confidence.

Honest limits

The formulas assume a simple random sample without non-response. Plan with response rates: if you need 385 answers at a 30% response rate, about 1,284 people must be invited. For hypothesis tests, group comparisons or A/B tests you need a power analysis, for example with G*Power – this calculator gives survey sizes.

Frequently asked questions

How do I calculate sample size?

Use n₀ = z² · p · (1 − p) ÷ e². At 95% confidence (z = 1.96), p = 50% and e = 5% that is 385 people.

What sample size do I need for a survey?

It depends on the margin of error you accept: ±5 points needs about 385 answers, ±3 points about 1,068 and ±10 points about 97.

Why is p = 50% so often assumed?

At 50% the product p · (1 − p) is largest, so the sample is largest. That keeps you on the safe side when you do not know the proportion.

How does population size matter?

For small populations the required sample falls. Above roughly 20,000 people the size hardly matters any more.

What does the confidence level mean?

It says how often the method would capture the true value within the margin of error if repeated – at 95%, in 95 of 100 samples.

Sources and legal basis

As of: · Editorial policy

Related tools