Skip to content

Math

Sample Size Calculator

Enter your values and the result updates as you type. The formula and a worked example are below the calculator.

What do you want to find?
Try an example

Use 50% if you are not sure.

Leave empty for an unlimited population.

Sample size needed

385

You need at least 385 responses or measurements to be 95% sure that the true value is within ±5% of your result.

n = z² × p × (1 − p) / e²

= 1.96² × 0.5 × 0.5 / 0.05²

= 384.16

Rounded up: 385

Sample size at other margins (rows) and confidence levels (columns)

Sample size for other margins of error and confidence levels
90%95%99%
±1%6,8079,60416,641
±2%1,7022,4014,161
±3%7571,0681,849
±5%273385666
±10%6997167

How to use

  1. Choose whether you want to find the sample size or the margin of error.
  2. Pick the confidence level (95% is the usual choice) and enter the margin of error you can accept, or the sample size you already have.
  3. Enter the share you expect to find (use 50% if you are not sure) and, if the group is small enough to count, its total size. Leave that empty for a very large or unknown group.
  4. Read the result, the steps, and the table that shows how the sample size changes with the margin and the confidence level.

Formula

Sample size n = z squared x p x (1 - p) / e squared. For a population of N, n' = N x n / (N - 1 + n), rounded up. Margin of error e = z x the square root of p(1 - p)/n, times the square root of (N - n)/(N - 1) when N is known. z is 1.96 for 95% and 2.58 for 99%.

Example

To estimate a share within ±5% at 95% confidence you need 385 responses for a large population. For a college of 12,000 students you need 373. A voter survey in a constituency of 15,00,000 voters still needs only 385.

These formulas assume a simple random sample and a share that is not extremely close to 0% or 100%. Non-response, clustered sampling and weighting need a larger sample. The z-scores are the two-decimal values from standard tables; tick the exact z-score option for the unrounded value.