Sample Size Calculator
Find the minimum number of responses you need for a survey at your chosen confidence level and margin of error.
Reviewed by the WorldCalcs team · Methodology · Last reviewed: July 2026
Use 50% if unsure — it gives the largest, safest sample.
Leave blank for a very large or unknown population.
Required sample size
385
What is a sample size calculator?
Before you run a survey or study, you need to know how many people to include. Ask too few and your results are unreliable; ask too many and you waste time and money. This sample size calculator finds the minimum number of responses needed to estimate a proportion — such as the share of customers who prefer a product — within a margin of error you set, at the confidence level you choose. Pair it with the confidence interval calculator once your data is collected.
How the sample size is calculated
For estimating a proportion, the sample size formula is n = z² × p × (1 − p) / E². Here z is the confidence multiplier (1.96 for 95% confidence), p is the expected proportion, and E is the margin of error as a decimal. When you don't know p, use 50% — it maximises p × (1 − p) and therefore gives the largest, safest sample. If your population is small and finite, the correction n′ = n / (1 + (n − 1) / N) trims the requirement, because sampling a big fraction of a small group carries more information. Sample sizes are always rounded up. For the sampling variability underneath the formula, see the standard deviation calculator, and to test hypotheses after collection, the p-value calculator.
Example
For 95% confidence, a 5% margin of error, and an unknown proportion (50%), the formula gives n = 1.96² × 0.5 × 0.5 / 0.05² = 384.16, so you need 385 responses. If your entire population is only 10,000 people, the finite-population correction lowers that to 370. Tightening the margin of error to 3% instead would push the requirement well above a thousand, because sample size grows with the square of the precision you demand.
All calculations happen in your browser. Nothing is sent, stored, or tracked.
Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer
How to use
Pick your confidence level, enter the margin of error you can accept and your best guess for the proportion (use 50% if you're unsure). Optionally enter a population size to apply the finite-population correction.
The formula is n = z² × p × (1 − p) / E², rounded up. z is 1.645, 1.96 or 2.576 for 90%, 95% and 99% confidence.