Free Sample Size Calculator
This calculator tells you how many people you need to survey to estimate a proportion at a chosen confidence level and margin of error. Pick 90%, 95% or 99% confidence, set your margin of error and expected proportion, and — if you are sampling a small group — add the total population for a finite-population correction. The default of 95% confidence, ±5% margin of error and a 50% proportion returns the familiar answer of 385.
Enter your confidence level, margin of error, and expected proportion to find the survey sample size.
- Z-score
- 1.96
- Margin of error (E)
- 0.05
- Proportion (p)
- 0.5
- Unrounded n
- 384.16
Sample size is always rounded up so the margin of error is met or beaten.
Quick answer
To find the sample size for estimating a proportion, use n = (Z² · p · (1 − p)) / E², where Z is the z-score for your confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%), p is the expected proportion as a decimal, and E is the margin of error as a decimal. For 95% confidence, a ±5% margin of error and p = 0.5, that is n = (1.96² × 0.5 × 0.5) / 0.05² = 384.16, which rounds up to 385. If you are surveying a finite population N, multiply through the correction n_adj = n / (1 + (n − 1) / N), which lowers the required sample for small groups.
Formula & method
Sample size for a proportion (large or unknown population)
n = (Z² · p · (1 − p)) / E²
- n — required sample size (rounded up to a whole number)
- Z — z-score for the confidence level (1.645 = 90%, 1.96 = 95%, 2.576 = 99%)
- p — expected proportion as a decimal (use 0.5 when unknown)
- E — margin of error (half-width of the confidence interval) as a decimal
p · (1 − p) is maximized at p = 0.5, so leaving p at 50% gives the largest, most conservative sample size.
Finite-population correction
n_adj = n / (1 + (n − 1) / N)
- n_adj — corrected sample size for a finite population (rounded up)
- n — sample size from the main formula above
- N — total size of the population being sampled
Apply this only when N is known and small relative to n; for very large N it has almost no effect.
The calculator converts your confidence level to a two-sided z-score (90% → 1.645, 95% → 1.96, 99% → 2.576), converts the margin of error and expected proportion from percentages to decimals, and applies n = (Z² · p · (1 − p)) / E². Because a sample size must be a whole number that meets or beats the target precision, the raw value is always rounded up (ceiling). If you supply a finite population N, it then applies the finite-population correction n_adj = n / (1 + (n − 1) / N) and rounds that up too. Leaving p at 50% is the conservative choice: p·(1 − p) is largest at p = 0.5, so it produces the biggest — safest — sample size when you have no prior estimate.
Examples
- Input
- Confidence 95% (Z = 1.96), margin of error E = 5%, proportion p = 50%
- Result
- n = 385
- Why
- Convert to decimals: E = 0.05, p = 0.5. Then n = (1.96² × 0.5 × 0.5) / 0.05² = (3.8416 × 0.25) / 0.0025 = 0.9604 / 0.0025 = 384.16. Round up to the next whole person: 385. This is why ‘about 385 responses’ is the textbook answer for a 95%/±5% poll.
- Input
- Confidence 99% (Z = 2.576), margin of error E = 3%, proportion p = 50%
- Result
- n = 1,844
- Why
- With E = 0.03 and p = 0.5: n = (2.576² × 0.5 × 0.5) / 0.03² = (6.635776 × 0.25) / 0.0009 = 1.658944 / 0.0009 = 1843.27. Round up to 1,844. Tightening the margin from 5% to 3% and raising confidence to 99% multiplies the sample roughly fivefold versus the default.
- Input
- Confidence 95% (Z = 1.96), E = 5%, p = 50%, population N = 2,000
- Result
- n = 323
- Why
- First the uncorrected n = (1.96² × 0.5 × 0.5) / 0.05² = 384.16. Apply the correction: n_adj = 384.16 / (1 + (384.16 − 1) / 2000) = 384.16 / (1 + 383.16/2000) = 384.16 / 1.19158 = 322.40. Round up to 323. Because 385 is a large share of just 2,000 people, the correction trims the needed sample from 385 to 323.
- Input
- Confidence 90% (Z = 1.645), E = 4%, p = 20%
- Result
- n = 271
- Why
- With E = 0.04 and p = 0.2: p(1 − p) = 0.2 × 0.8 = 0.16, so n = (1.645² × 0.16) / 0.04² = (2.706025 × 0.16) / 0.0016 = 0.432964 / 0.0016 = 270.60. Round up to 271. Using p = 0.2 instead of 0.5 shrinks p(1 − p) from 0.25 to 0.16, which reduces the sample — but only do this if you genuinely expect the result near 20%.
When to use this tool
- Planning a survey or poll and you need to know how many completed responses to collect for a target confidence level and margin of error.
- Estimating a single proportion or percentage — the share who say ‘yes’, click, convert, or prefer option A — rather than a mean of continuous measurements.
- Sampling from a known, limited group (employees, members, customers) where the finite-population correction meaningfully lowers the sample you need.
- Sanity-checking a research plan or RFP: confirming that a vendor's proposed sample size matches the precision they promise.
Common mistakes
- Entering the margin of error or proportion as a raw decimal instead of a percent. In this tool 5 means 5% (0.05) and 50 means 50% (0.5). Typing 0.05 in the margin-of-error box would be read as 0.05%, demanding a wildly larger sample.
- Using p = 50% when a reliable prior estimate exists. p = 0.5 is the safe default because it maximizes p(1 − p), but if past data shows the true proportion is, say, 20% or 80%, using that value yields a smaller, still-valid sample.
- Confusing margin of error with confidence level. The margin of error (E) is the ± precision of your estimate; the confidence level (90/95/99%) is how often that interval would contain the true value. They are separate inputs and both raise the sample size when tightened.
- Forgetting the finite-population correction for small groups. For a 500-person company or a 3,000-member club, the uncorrected formula overstates the sample. Enter the population N so the correction can reduce n appropriately.
Frequently asked questions
Why is 385 the standard sample size for a survey?
It comes from the most common settings: 95% confidence (Z = 1.96), a ±5% margin of error, and p = 50%. Plugging in gives n = (1.96² × 0.5 × 0.5) / 0.05² = 384.16, which rounds up to 385. That single number works for any large population, which is why ‘about 400 responses’ is a frequent rule of thumb.
Why does the population size barely change the answer for large groups?
The finite-population correction n / (1 + (n − 1) / N) only shrinks the sample when n is a noticeable fraction of N. For a country of millions, 385 responses is a tiny share, so the correction is negligible — that's why national polls of 30 million or 300 million people use almost the same sample size. It matters mainly for populations under a few thousand.
What proportion (p) should I use if I have no idea what to expect?
Use 50% (p = 0.5). The term p(1 − p) is largest at p = 0.5, so it produces the maximum required sample size. Choosing 50% guarantees your margin of error is met no matter what the true proportion turns out to be, making it the conservative, safe default.
How do confidence level and margin of error each affect the sample?
Both increase the sample when made stricter, but not equally. Raising confidence swaps in a larger Z (1.96 → 2.576 from 95% to 99%), and since n depends on Z², that alone multiplies the sample by about 1.7. Halving the margin of error quarters the precision target and quadruples the sample, because n depends on 1/E². Margin of error is usually the bigger lever.
Is this the right calculator for estimating an average rather than a percentage?
No. This formula is for a proportion (a yes/no share or percentage). To size a sample for a mean of continuous data — like average income or height — you need n = (Z · σ / E)², which uses the population standard deviation σ instead of p(1 − p). Use a mean-based sample size formula in that case.
Should I survey more people than the calculated sample size?
Often yes. The result is the number of complete, usable responses you need. Because surveys have non-response and unusable answers, invite more people than n — divide n by your expected response rate. For example, if you need 385 responses and expect a 20% response rate, you'd contact about 385 / 0.20 = 1,925 people.
Sources & references
- NIST/SEMATECH e-Handbook of Statistical Methods — Sample sizes for proportions
- Wikipedia — Sample size determination
External references open in a new tab. We are independent and not affiliated with these organizations.
- ✓ Free to use
- ✓ No sign-up required
- ✓ Runs entirely in your browser — nothing is uploaded.
- ✓ Formula and method shown above
Provided “as is” for general information only — results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.
Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.
Related tools
- Confidence Interval CalculatorCalculators
- Z-Score CalculatorCalculators
- Standard Deviation CalculatorCalculators
- Percentage CalculatorCalculators
- Mean Median Mode CalculatorCalculators
Embed this tool on your site
Free to embed, no sign-up. Paste this code where you want the sample size calculator to appear: