How to use the Sample Size Calculator
- 1. Pick what you measureChoose a percentage (proportion) or an average (mean).
- 2. Set accuracyEnter the confidence level and the margin of error you can accept.
- 3. Add the populationOptionally enter the total group size to shrink the sample.
The formula
For a proportion: n₀ = z² × p(1 − p) ÷ E². For a mean: n₀ = (z × σ ÷ E)². Here z comes from the confidence level, p is your best guess of the percentage, σ is an estimate of the spread and E is the margin of error. When the whole population is small, apply the finite population correction n = n₀ ÷ (1 + (n₀ − 1) ÷ N).
Worked example: 95% confidence (z = 1.96), a ±5% margin and p = 50% give n₀ = 1.96² × 0.25 ÷ 0.0025 = 384.15, which rounds up to 385 responses. For a college of 10,000 students the correction brings this down to 370.
Planning tips
- Use 50% if unsure. It gives the largest sample, so your result is safe whatever the true value.
- Halving the margin quadruples the sample. ±2.5% needs about 1,537 responses at 95%.
- Plan for non-response. If only 20% reply, invite about five times the number shown.
- Random beats big. A huge sample from a biased list, such as only your Instagram followers, still gives biased answers.
For the mean version, take σ from a pilot study or past data; a guess that is too small leaves your study short. These formulas assume simple random sampling. Clustered or stratified designs need more careful planning. After collecting data, report the real range with the confidence interval calculator.
Frequently asked questions
Does population size matter much?
Only when the sample is a big share of the population. For populations above about 100,000 the result barely changes.
Is this enough for A/B tests?
Not exactly. A/B tests compare two groups and need a power calculation, which usually requires a larger sample per group.
Is the Sample Size Calculator free?
Yes, the Sample Size Calculator is free. The first time you see your first result, you are asked for your name and WhatsApp number once. After that, this and every other Uncodemy tool opens straight away without the form.