How to use
- Choose whether you want to find the sample size or the margin of error.
- 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.
- 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.
- 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.