Use our Sample Size Calculator to determine how many responses you need to achieve statistically reliable results in surveys, polls, and A/B tests. Set a confidence level, choose a margin of error, and enter your expected proportion to get a clear, defensible sample size. Optionally include the total population and a design effect for clustered or complex sampling.
What is a sample size and why does it matter?
Sample size is the number of observations or responses you collect from a population. Choosing the right sample size ensures your estimates are accurate within a target margin of error at a chosen confidence level. If your sample is too small, your results may be noisy and misleading; if it is too large, you may spend more time and resources than necessary. This calculator helps you balance precision and practicality using established statistical formulas.
How the Sample Size Calculator works
For proportions (such as “percent who prefer Brand A”), the foundational formula assumes a simple random sample from a very large (effectively infinite) population:
n0 = (Z^2 × p × (1 ? p)) / e^2
Where Z is the Z-score for your confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99% approximately), p is the expected proportion, and e is the margin of error (both expressed as decimals). When the total population is not large, a finite population correction (FPC) is applied to reduce the required sample:
n = n0 / (1 + (n0 ? 1)/N)
For clustered or complex designs, a design effect (DEFF) inflates the sample size to compensate for the reduced effective sample size due to clustering:
n_final = n × DEFF
Key inputs explained
- Confidence level: The probability that your interval contains the true population value. Common choices are 90%, 95%, and 99%.
- Margin of error (%): The maximum expected difference between your sample estimate and the true value.
- Expected proportion (%): Your best estimate of the proportion. If unknown, use 50% for the most conservative sample size.
- Population size: Total number of people or items in the population. Leave blank to assume an infinite population.
- Design effect (DEFF): Use 1 for simple random samples; values greater than 1 for clustered sampling (e.g., 1.2–2+).
When to use finite population correction
When your sample is a substantial fraction of the population (commonly, more than about 5–10%), FPC meaningfully reduces the required sample size. For very large populations, the correction becomes negligible. If you are surveying a small team, a niche customer list, or a specific cohort, FPC helps avoid oversampling while maintaining precision.
Practical tips for using the calculator
- If your expected proportion is unknown, using 50% yields the largest (safest) sample size.
- Choose a margin of error that fits your decision-making needs; smaller margins require larger samples.
- Increasing confidence level increases sample size. 95% is a widely accepted default.
- Account for nonresponse by inflating the final sample you plan to contact (e.g., divide by expected response rate).
- For clustered sampling, multiply by an appropriate design effect to maintain effective precision.
Example: Planning a customer satisfaction survey
Suppose you want to estimate the percentage of satisfied customers with a 95% confidence level and a 5% margin of error. If you do not know the expected proportion, set it to 50%. For a large customer base, the calculator will yield an initial sample size near 385. If your customer population is about 10,000, applying the finite population correction will reduce that number to roughly 370. If you anticipate a design effect of 1.2 due to clustering (for example, surveying multiple customers from the same region), multiply the corrected sample by 1.2 to obtain your final target.
Common mistakes to avoid
- Confusing margin of error with confidence level: they are distinct levers that both influence sample size.
- Ignoring finite population correction when surveying small populations.
- Underestimating design effect in clustered or multi-stage samples.
- Using an unrealistically low margin of error without adequate budget or timelines.
Beyond proportions: means and A/B tests
While this calculator focuses on proportions, similar logic applies to means, where you would use an estimate of the standard deviation instead of p(1 ? p). For A/B tests, you may think in terms of the baseline conversion rate (p) and the minimum detectable effect (difference in proportions) alongside power and alpha. If you need power-based calculations, consider a dedicated power and sample size tool.
Get confident, actionable results
With a few inputs, the Sample Size Calculator quickly delivers a defensible sample size tailored to your study. By setting clear precision targets and reflecting real-world constraints like finite populations and clustered designs, you can plan data collection that is both efficient and statistically sound.