Skip to content

Sample Size Calculator

How many responses or samples you need for a given confidence level and margin of error

Loading the tool…

Calculates how many responses or samples a survey or experiment needs for a given confidence level, margin of error or power. Use it to decide how many people to survey, or how many subjects each group needs.

How to use

  1. Choose a tab: "Proportion (survey)", "Mean", "Compare two means" or "Compare two proportions".
  2. For a survey, enter the "Confidence level", "Margin of error (±)" and "Expected proportion", and the "Population size (optional)" if the group is a known number.
  3. To compare two groups, set the effect size (or mean difference and standard deviation), "Significance level α", "Power" and "Test direction".
  4. To get the margin of error for a given sample size, switch "Solve for" to "Margin of error".

How it works

Questions and answers

What sample size do I need for a survey?
At 95% confidence, ±5% margin of error and 50% expected proportion: 1.96² × 0.25 ÷ 0.05² ≈ 384.2, so 385. For ±3% you need 1,068.
Does a small population need a smaller sample?
Yes. With the same settings and a population of 1,000, the finite population correction gives 278. For a very large population, size hardly matters.
What expected proportion should I use if I do not know it?
Use 50%. p(1 − p) is largest there, so it gives the largest, safest sample size.
How many subjects per group do I need to compare two groups?
With effect size d = 0.5, α = 0.05, 80% power and a two-sided test, 64 per group. Smaller effects need more.