A sample size calculator tells you how many people to survey for a chosen confidence level and margin of error. Pick a confidence level, enter a margin of error and, if you know it, your population, and it returns the sample size you need. For 95 percent confidence and a 5 percent margin, you need about 385 responses.
Required sample size
Calculations run in your browser. Inputs are not sent to our servers; anything you Save stays in this browser only.
Saved results (0)
How to Use the Sample Size Calculator
- Pick a confidence level: 90, 95 or 99 percent.
- Enter the margin of error you can accept, and the expected proportion if you have one.
- Add the population size if it is small or known; the sample size updates live.
Each output guides your survey plan:
| Result | What it tells you |
|---|---|
| Required sample size | How many responses you need, adjusted for your population. |
| For an unlimited population | The sample size before any finite-population adjustment. |
| Confidence and margin | The settings behind the result. |
What Is Sample Size?
Sample size is the number of people or items you need to survey so that your results represent a larger group within a stated accuracy. Survey too few and the findings are unreliable; survey far more than needed and you waste time and money. The right sample balances precision against cost.
Two choices set it. Confidence level is how sure you want to be that the true value lies within your range, commonly 95 percent. Margin of error is how wide that range is, such as plus or minus 5 percent. Higher confidence and a tighter margin both demand a larger sample.
How the Sample Size Calculator Works
It applies the standard formula for estimating a proportion, then adjusts for a finite population if you enter one.
n = z^2 x p(1 - p) / e^2, adjusted for population NThe base sample size is n0 = z^2 * p(1-p) / e^2 where z comes from the confidence level, p is the expected proportion and e the margin of error. For a known population N, it shrinks to n = n0 / (1 + (n0 - 1)/N).
- Turn the confidence level into a z-score.
- Compute the base sample size from z, the proportion and the margin.
- Adjust down for a finite population if one is given.
Using a proportion of 50 percent gives the largest, safest sample when you cannot estimate it in advance.
Sample Size Example
For 95 percent confidence, the z-score is 1.96. With a 5 percent margin and an unknown proportion set to 50 percent, the base sample is 1.96^2 * 0.25 / 0.05^2 = 384.16, which rounds up to 385.
Tighten the margin to 3 percent and the requirement jumps to about 1,068, because halving the margin roughly quadruples the sample. That trade-off is why 5 percent is such a common choice.
If your population is only 10,000, the finite-population adjustment brings the 385 down to about 370, a small saving that grows as the population shrinks toward the sample size.
Confidence and Margin Compared
These settings drive the sample size, and their costs are worth seeing side by side.
| Setting | Common choice | Effect on sample |
|---|---|---|
| Confidence 95% | The default | About 385 at a 5% margin |
| Confidence 99% | Higher certainty | About 664 at a 5% margin |
| Margin 5% | Typical | Baseline |
| Margin 3% | Tighter | Roughly triple the sample |
A tighter margin costs far more than a higher confidence level, because the margin sits squared in the denominator. To read any of these as a plain percentage, the percentage calculator helps.
What Changes the Sample Size
Four inputs move the requirement, some far more than others.
Margin of Error
Because it is squared in the formula, halving the margin roughly quadruples the sample, the strongest lever of all.
Confidence Level
Raising confidence from 95 to 99 percent lifts the sample by about 70 percent, since the z-score grows.
Expected Proportion
The sample peaks at a 50 percent proportion; a more lopsided expected response lowers it.
Population Size
For very large populations the size barely matters, but for small ones the finite-population adjustment cuts the sample noticeably.
When to Use a Sample Size Calculator
Planning a Survey
Decide how many responses to collect before you launch, so the results are trustworthy.
Designing a Study
Set a defensible sample for research where precision and confidence must be stated.
Checking a Poll
See whether a published poll surveyed enough people for its claimed margin of error.
Common Mistakes
1. Confusing Confidence with Margin
Confidence is how sure you are; margin is how wide the range is. They are different settings.
2. Forgetting the Response Rate
The sample is completed responses. Invite more people to allow for those who do not reply.
3. Assuming a Lopsided Proportion
When unsure, use 50 percent. It gives the largest, safest sample.
4. Ignoring the Population for Small Groups
For a small, known population, the finite-population adjustment can reduce the sample meaningfully.
5. Chasing a Tiny Margin
A very small margin demands a huge sample; weigh the precision against the cost.
Accuracy and Limitations
The formula is exact for a simple random sample estimating a proportion, but real surveys add complications.
What it calculates accurately
- The sample size for a proportion at a chosen confidence and margin
- The finite-population adjustment
- The base size for a large population
What it does not account for
- Non-response and drop-out
- Clustered or stratified designs
- Estimating means rather than proportions
- Small sub-group analysis within the survey
How We Calculate Sample Size
Frequently Asked Questions About Sample Size
How do I calculate sample size?
Use n = z^2 x p(1-p) / e^2, where z comes from the confidence level, p is the expected proportion and e the margin of error. This calculator applies it and adjusts for your population.
What sample size do I need for 95 percent confidence?
With a 5 percent margin and an unknown proportion, about 385 responses. A tighter 3 percent margin needs about 1,068.
What is margin of error?
It is how close your survey result is expected to be to the true value, such as plus or minus 5 percent. A smaller margin needs a much larger sample.
What is confidence level?
It is how sure you want to be that the true value falls within your margin of error. Common choices are 90, 95 and 99 percent.
What proportion should I use if I do not know it?
Use 50 percent. It produces the largest, safest sample, so you are covered whatever the true proportion turns out to be.
Does population size matter?
For very large populations, barely. For small, known populations, the finite-population adjustment can reduce the required sample noticeably.
Why does a smaller margin need so many more people?
Because the margin is squared in the formula. Halving the margin roughly quadruples the sample needed.
Should I survey more people than the sample size?
Yes. The sample is completed responses, so invite more to allow for non-response and incomplete answers.
Is anything I enter stored?
No. The calculation runs in your browser, and nothing you enter is sent anywhere unless you Save a result, which stays on this device only.
Sources
- Sample size determination (Wikipedia).
- Margin of error (Wikipedia).
- Confidence intervals (Maths Is Fun).
Related Calculators
Looking for more statistics and math tools?
Explore all math calculatorsThis calculator is for planning surveys and studies. It uses the standard proportion formula; complex designs, clustering and small effects may need a statistician. Treat the result as a sound starting estimate. Spotted an error? Let us know.
Creator
Hamza Shakeel is the Chief Technology Officer at MultiCalculators.com, responsible for the platform's technical architecture, calculator engine performance, and infrastructure reliability. He leads engineering efforts focused on site speed, mobile responsiveness, Core Web Vitals optimization, and security. Hamza ensures every calculation runs accurately and instantly across all devices, while maintaining the platform's stability and scalability as it grows. His work directly supports the seamless, trustworthy experience users expect from MultiCalculators.com.
Areas of Expertise: Web Engineering, Core Web Vitals, Site Performance, Calculator Logic, Cloud Infrastructure, Security
