What this sample size calculator does
This calculator helps you estimate how many responses you need so that your survey, poll, or A/B test results are statistically reliable. You choose a confidence level, a margin of error, and an expected proportion (or conversion rate). Optionally, you can enter the total population and a target statistical power if you are planning an experiment.
The tool then computes the minimum sample size that meets those settings. This prevents underpowered studies that produce ambiguous results and avoids collecting more data than you really need.
Key inputs: what each field means
- Population Size (optional): Total number of people or units you could, in principle, measure (e.g., all customers on your list, total employees, all site visitors in your target period). Leave blank if the population is very large or unknown.
- Expected Proportion (%): Your best guess of the percentage you expect to answer "yes" or convert (e.g., expected satisfaction rate or baseline conversion rate). If you are unsure, a common conservative choice is 50%.
- Margin of Error (%): How far your survey estimate is allowed to be from the true value, in either direction. For example, a 5% margin of error at an observed 60% approval means the true approval is likely between 55% and 65%.
- Confidence Level: How sure you want to be that the confidence interval covers the true value. Typical choices are 90%, 95%, or 99%. A higher confidence level requires a larger sample size.
- Statistical Power (for A/B tests): The probability of detecting a real effect of the size you care about in an experiment. Common choices are 80%, 90%, or 95% power. Higher power means a larger sample size.
The core sample size formula for proportions
For large populations and a proportion outcome (e.g., % who say "yes", % who convert), a standard formula for the required sample size is:
where:
- n = required sample size (for a very large population)
- Z = Z-score for your chosen confidence level (for example, 1.645 for 90%, 1.96 for 95%, 2.576 for 99%)
- p = expected proportion as a decimal (e.g., 0.5 for 50%)
- e = margin of error as a decimal (e.g., 0.05 for 5%)
The "worst case" is when p = 0.5, because the variability is highest when responses are evenly split. That is why many generic sample size tables assume 50% when you do not have prior data.
Adjusting for a finite population
If your population is not very large (for example, your entire staff, a specific email list, or all customers on a plan), you can refine the estimate using a finite population correction. After calculating the large-population sample size n, use:
where N is your population size and nadj is the adjusted sample size. For very large N, this correction is tiny; for smaller populations, it can noticeably reduce how many responses you need.
Interpreting your results
Once you enter your inputs and run the calculator, you get a recommended sample size. In practice, you should:
- Round up the result to a whole number of respondents.
- Expect to invite more people than the sample size to allow for non-response or drop-off.
- Check that the required sample is realistic given your traffic, budget, or time frame.
If the required sample size seems very large, you can sometimes reduce it by accepting a slightly larger margin of error, using a lower confidence level, or narrowing the scope of your target group.
Worked example: employee survey with a finite population
Suppose you manage a company with 800 employees and want to estimate the percentage who support a new policy.
- Population size: N = 800
- Expected proportion: p = 50% (0.5), because you are unsure
- Margin of error: e = 5% (0.05)
- Confidence level: 95% (Z ≈ 1.96)
First, compute the large-population sample size:
This gives n ≈ 385 for a very large population.
Next, apply the finite population correction with N = 800:
This yields an adjusted sample size of about 260 employees. Surveying 260 people instead of 385 saves effort while maintaining your desired precision and confidence.
How this relates to A/B tests and statistical power
For A/B tests, you are often trying to detect a difference between two conversion rates (for example, variant B converts at 12% instead of 10%). In this setting:
- The expected proportion is usually the baseline conversion rate of your control (e.g., 10%).
- The margin of error or, more commonly, the minimum detectable effect represents the smallest difference between variants that you care about (e.g., a +2 percentage point lift).
- Statistical power controls the chance of correctly detecting that difference if it is real. 80% power is a widely used default.
Higher power and smaller detectable differences both push the required sample size up. When planning an experiment, make sure your traffic or user base can realistically support the recommended sample size within your desired time frame.
Reference table: typical sample sizes for large populations
The table below shows approximate required sample sizes for a very large population, assuming a 50% proportion and common margins of error at typical confidence levels.
| Confidence level |
Margin of error |
Approximate sample size (large population) |
| 90% |
5% |
≈ 271 |
| 95% |
5% |
≈ 385 |
| 99% |
5% |
≈ 666 |
| 95% |
3% |
≈ 1,067 |
| 95% |
2% |
≈ 2,401 |
You can use these values as a quick sense check. The calculator refines them further based on the exact inputs you provide and any finite population adjustment.
Assumptions and limitations
This calculator is designed for proportion outcomes (yes/no, success/fail, convert/not convert) under a standard simple random sampling or simple randomized experiment. Keep in mind:
- Random sampling: The formulas assume that every member of the population has an equal chance of being selected. Convenience samples, opt-in surveys, or highly biased samples may not be well described by these results.
- Binary outcome: The main formulas target a single proportion. Multi-category questions or continuous outcomes (like revenue) require different designs and formulas.
- Normal approximation: The method relies on the normal (Gaussian) approximation, which works best for moderate to large sample sizes and when the expected proportion is not extremely close to 0% or 100%.
- No design effects: Complex survey designs (stratified, clustered, or weighted samples) can require larger samples than those shown here.
- Non-response: The recommended sample size is the number of usable responses. If you expect only a fraction of invitees to respond, you should invite more people accordingly.
For high-stakes decisions (for example, clinical studies, major policy changes, or expensive experiments), consider consulting a statistician to tailor the design and sample size to your specific context.