Sample Size Calculator
Introduction: What this sample size calculator does for surveys and A/B tests
This sample size calculator helps you estimate how many completed responses you need when the outcome is a single proportion, such as approval, conversion, or purchase intent. It combines your confidence level, margin of error, and expected proportion, and it can also apply a finite population correction when you already know the size of the audience you can reach.
That makes the calculator useful for survey planning, list sizing, and quick experiment scoping. It gives you a practical starting point before you send invitations, allocate traffic, or decide whether a study is large enough to support a reliable conclusion.
Key inputs for this sample size calculator: what each field means
This sample size calculator turns a few planning assumptions into a response target, so each field changes the result in a predictable way.
- Population Size (optional): Enter the total number of people or units you could realistically survey, poll, or observe. This is the full audience size, such as a customer list, staff roster, or enrolled users. Leave it blank when the population is very large, open-ended, or not known well enough to count.
- Expected Proportion (%): Use your best estimate of the share that will answer yes, convert, approve, or otherwise fall on the “success” side of the binary outcome. If you do not have prior data, 50% is conservative because it produces the largest required sample for a given margin of error.
- Margin of Error (%): This is the amount of sampling uncertainty you are willing to tolerate around the estimated proportion. A tighter margin, such as 3% instead of 5%, means the calculator will ask for more responses because it is trying to pin the result down more precisely.
- Confidence Level: Choose how confident you want to be that the interval contains the true proportion. Higher confidence, such as 99%, widens the interval and pushes the sample size upward; lower confidence reduces the needed sample but gives you a looser guarantee.
- Statistical Power (for A/B tests): This setting is used for a rough experiment-planning estimate. Higher power means a better chance of detecting an effect of the size you care about, but it also increases the number of observations the calculator recommends.
The core sample size formula for proportions
For this sample size calculator, the standard large-population formula starts with the confidence level, expected proportion, and margin of error.
Formula: n = (Z^2 × p × (1 − p)) / e^2
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 most conservative planning point is usually p = 0.5, because the variability is highest when the response is split right down the middle. That is why many sample size tables and quick survey rules of thumb start at 50% when you do not yet have prior data for the proportion you want to estimate.
Adjusting sample size for a finite population
When this sample size calculator is used for a closed audience such as a staff list, a customer segment, or a member directory, the finite population correction trims the large-population estimate once the sample becomes a meaningful share of the whole.
After calculating the large-population sample size n, use:
Formula: n_adj = (n × N) / (n + N − 1)
where N is your population size and nadj is the adjusted sample size. For very large N, this correction barely changes the answer; for smaller audiences, it can save a noticeable number of invites while keeping the same target precision.
Interpreting your sample size calculator results
Once you run this sample size calculator, the result tells you how many usable responses or completed observations you need, not simply how many people to contact.
- 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 relative to your traffic, budget, list size, or deadline.
If the answer is larger than you expected, the usual levers are a looser margin of error, a lower confidence level, a broader target group, or a willingness to accept more uncertainty. Each of those choices changes the response target in a way that is easy to compare before you launch the survey or experiment.
Worked example: estimating support for a policy in an 800-person company
This worked example shows how the sample size calculator behaves when you have a finite audience and only need a rough read on support for a 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:
Formula: n = (1.96^2 × 0.5 × (1 − 0.5)) / 0.05^2
This gives n ≈ 385 for a very large population.
Next, apply the finite population correction with N = 800:
Formula: n_adj = (385 × 800) / (385 + 800 − 1)
This yields an adjusted sample size of about 260 employees. In other words, the calculator starts with the familiar 385-response benchmark and then trims it because the employee list is finite, not an unlimited market. Surveying 260 people instead of 385 saves effort while keeping the same basic precision goal.
How this sample size calculator relates to A/B tests and statistical power
For A/B tests, this sample size calculator is a planning shortcut for traffic needs rather than a complete experimental design. The expected proportion usually stands in for the control conversion rate, while the margin of error can be treated as a rough measure of the effect size you want the test to be able to see.
- 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, sometimes sharply. When the recommended number is too large for your traffic, you may need to narrow the question, lengthen the test, or accept that the experiment will only support a directional read instead of a finely measured one.
Reference table: sample size calculator benchmarks for large populations
This quick reference table gives sample size calculator benchmarks for a very large population, using 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 before you change inputs. If the calculator lands close to one of these benchmarks, it is usually behaving as expected; if it is much smaller or larger, the difference is often driven by your chosen proportion, confidence level, or finite population correction.
Assumptions and limitations of this sample size calculator
This sample size calculator is built for one binary outcome at a time, such as yes/no survey answers or convert/not convert events, so its formulas work best when the sample is random and the target metric is a proportion.
- 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, such as clinical studies, major policy changes, or expensive experiments, consider consulting a statistician to tailor the design and sample size to your specific context.
How to use this sample size calculator
- Enter Population Size (optional) when you know the full group you could sample, such as subscribers, employees, or active accounts. Leave it blank if the population is effectively unlimited or not worth counting.
- Enter Expected Proportion (%) as your best guess of the share that will respond “yes,” convert, or otherwise count as a success. If you are unsure, 50% is the most conservative starting point.
- Enter Margin of Error (%) as the precision you want around the estimated proportion. Smaller values demand larger samples because the calculator is trying to narrow the uncertainty band.
- Run the calculation and compare the output with a second scenario, such as a tighter margin of error or a different expected proportion, before you commit to collecting data.
Arcade Mini-Game: Sample Size Calculator Calibration Run
Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.
Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.
