Sample Size Calculator
Use this sample size calculator to find how many responses your survey needs, how accurate your current sample is, or how many visitors an A/B test needs. Set your confidence level, margin of error and population, and the answer updates as you type.
- 3 calculators in 1
- Finite population correction
- Any confidence level
- Free, private, no sign-up
5% is common. Use 3% for tighter results.
Leave blank if it is very large or unknown.
Keep 50% if unsure. It gives the safest sample.
Email surveys often get 10% to 30%.
Please check the highlighted fields.
Sample size needed
370
responses at 95% confidence, ±5% margin, population 10,000
Sample size by margin of error
Halving your margin to ±2.5% would need 1,333 responses.
The share who gave an answer, such as 62% saying yes.
Please check the highlighted fields.
Margin of error
±4.90%
at 95% confidence with 400 responses
Margin of error by sample size
The true value is likely between 45.10% and 54.90%.
Your current rate for the control version.
The smallest lift worth detecting.
Please check the highlighted fields.
Visitors needed per variant
8,158
to detect a change from 5% to 6%
Visitors per variant by effect size
Add your daily visitors to estimate how long the test should run.
Why this sample size calculator does more
Most sample size tools give one number and stop. This one shows how that number changes, plans for non-response and covers A/B tests too, so you can choose a sample with confidence.
Three calculators in one
Switch between survey sample size, margin of error and A/B test sample size without leaving the page.
Finite population correction
Small groups need fewer responses. The tool adjusts the sample automatically when you enter a population size.
Response-rate planning
Enter your expected response rate to see how many invitations to send, not just how many replies you need.
Live sensitivity chart
See instantly how the sample grows as the margin of error shrinks or the effect size gets smaller.
Exact Z-scores
Use any confidence level, such as 92.5%. The Z-score comes from an exact inverse normal formula, not a short lookup list.
Private and shareable
Everything runs in your browser. Copy a ready-to-paste result or share a link that reopens your exact inputs.
How to use the sample size calculator
Pick a mode above, then follow these steps. Results update as you type.
- Choose a confidence levelSelect 95% for most research. Pick 90% for quick checks or 99% when mistakes are costly.
- Set your margin of errorDecide how far your result may drift from the true value. Plus or minus 5% suits most surveys.
- Add your population sizeEnter the number of people you could survey. Leave it blank if the group is very large or unknown.
- Adjust proportion and response rateKeep 50% unless past data says otherwise. Then add your expected response rate to plan invitations.
- Compare and shareTap a row in the chart to test another margin. Finally, copy the result or share a link with your team.
How to calculate sample size
Sample size depends on three things: how confident you want to be, how precise the result must be, and how varied the answers are likely to be. First, the calculator finds the sample for a very large population. Then it applies the finite population correction if you entered a population size.
Here, Z is the Z-score for your confidence level, p is the expected proportion, e is the margin of error and N is the population size. In the A/B formula, p₁ is the baseline rate, p₂ is the target rate and β sets the power.
Worked example: survey of 10,000 customers
- Confidence level 95%
- Z = 1.96
- Expected proportion and margin of error
- p = 0.5, e = 0.05
- Sample for a large population: 1.96² × 0.25 / 0.0025
- 384.16
- Correct for N = 10,000: 384.16 / (1 + 383.16 / 10,000)
- 369.98
- Round up
- 370 responses
- Invitations at a 30% response rate
- 1,234
So you need 370 completed responses. Because only about 3 in 10 people reply, you should invite at least 1,234 customers.
Sample size table at 95% confidence
Use this table for a fast answer. It assumes a 50% proportion, which gives the largest and safest sample.
| Population | ±10% | ±5% | ±3% | ±1% |
|---|---|---|---|---|
| 100 | 50 | 80 | 92 | 99 |
| 500 | 81 | 218 | 341 | 476 |
| 1,000 | 88 | 278 | 517 | 906 |
| 5,000 | 95 | 357 | 880 | 3,289 |
| 10,000 | 96 | 370 | 965 | 4,900 |
| 50,000 | 96 | 382 | 1,045 | 8,057 |
| 100,000 | 96 | 383 | 1,056 | 8,763 |
| 1,000,000 | 97 | 384 | 1,066 | 9,513 |
| Unlimited | 97 | 385 | 1,068 | 9,604 |
Notice how the sample barely changes once the population passes about 20,000 people.
How to choose the confidence level and margin of error
The confidence level tells you how often your method would capture the true value if you repeated the survey many times. A higher level needs a larger Z-score and therefore a larger sample.
| Confidence level | Z-score | Typical use |
|---|---|---|
| 80% | 1.282 | Early exploration |
| 90% | 1.645 | Internal business decisions |
| 95% | 1.960 | Academic and market research |
| 98% | 2.326 | High-stakes surveys |
| 99% | 2.576 | Medical and safety studies |
The margin of error has an even bigger effect. Halving it roughly quadruples the sample, because the margin appears squared in the formula. For example, moving from ±5% to ±2.5% takes a large-population survey from 385 to 1,537 responses.
Sample size for A/B tests
A/B tests work differently. Instead of a margin of error, you choose the smallest lift worth detecting and the power, which is the chance of spotting that lift if it is real. Small lifts on low conversion rates need far more traffic, so check the sensitivity chart before you launch. If you are also working with averages or spread, the standard deviation calculator and Z-score calculator can help.
Benefits of getting your sample size right
The right sample saves money and makes your findings easier to trust.
Avoid weak studies. Too few responses produce wide margins and results that may not hold up.
Cut wasted budget. Extra responses beyond your target add cost but very little accuracy.
Defend your method. Copy the result with its inputs for a thesis, report or ethics review.
Plan fieldwork. Know how many invitations to send before you start collecting data.
Run A/B tests that finish. Estimate test length from your daily traffic and avoid stopping too early.
Report results honestly. State the margin of error so readers know how precise each figure is.
Sample size calculator FAQs
Clear answers to the questions researchers, students and marketers ask most.
For most surveys, 385 responses give a margin of error of plus or minus 5% at 95% confidence, however large the population is. Smaller populations need fewer responses. For example, a population of 1,000 needs about 278.
Multiply the squared Z-score by p(1 - p), then divide by the squared margin of error. With 95% confidence (Z = 1.96), p = 0.5 and a 5% margin, that gives 384.16, which rounds up to 385. Then apply the finite population correction if your population is small.
The margin of error is the range above and below your result that likely contains the true value. A result of 60% with a 5% margin at 95% confidence means the true figure is probably between 55% and 65%.
A proportion of 50% gives the largest value of p(1 - p), so it produces the safest and most conservative sample size. Use a different value only when earlier data suggests the likely result.
Only when the population is small. Above about 20,000 people the required sample barely changes. At 95% confidence and a 5% margin, 100,000 people need 383 responses while 1,000,000 need 384.
95% is the standard for academic, market and medical research. Use 90% for quick internal decisions and 99% when mistakes are costly. A higher confidence level always needs a larger sample.
It depends on your baseline conversion rate and the smallest lift you want to detect. With a 5% baseline, a 20% relative lift, 95% confidence and 80% power, you need about 8,158 visitors per variant.
Divide your required sample by the expected response rate. If you need 370 responses and expect 30% of people to reply, invite at least 1,234. The calculator does this for you automatically.
Get a sample size you can defend
Guessing leads to weak results or wasted budget. This sample size calculator gives you a clear number, the margin behind it and the invitations you need, in seconds.
Results assume simple random sampling. Clustered, stratified or weighted designs may need a design effect adjustment, so check with a statistician for complex studies.