Sample Size Calculator

Estimate the minimum sample size for surveys and studies. Choose proportion or mean mode, set confidence level and margin of error, then apply finite population correction when needed.

Recommended Sample Size

385

Formula used: n = z² × p(1−p) / E²

Confidence

95%

Z Value

1.96

Initial n (infinite N)

384.16

Adjusted n

384.16

What This Tool Calculates

This calculator estimates the minimum number of observations required to reach a target precision at a selected confidence level. It supports two common planning modes: proportion studies (survey percentages, conversion rates, pass/fail outcomes) and mean studies (continuous outcomes such as time, score, or weight). Proper sample-size planning is essential for credible statistical inference and helps avoid underpowered studies.

Sample Size Formulas

For Proportions

n = z² × p(1−p) / E²

  • z: critical value for confidence level
  • p: expected proportion (as decimal)
  • E: desired margin of error (as decimal)

For Means

n = (z × σ / E)²

  • σ: standard deviation estimate
  • E: acceptable absolute error in original units

Finite Population Correction

If total population size is known and limited, adjusted sample size can be computed as: n_adj = (N × n) / (N + n − 1).

Worked Example (Proportion)

Suppose you need a 95% confidence survey with ±5% margin of error and unknown true proportion, so you use p = 0.50.

  • z = 1.96
  • n = 1.96² × 0.5 × 0.5 / 0.05² ≈ 384.16
  • Round up to 385 responses

Choosing Inputs Well

  • Use p = 50% if uncertain, to avoid underestimating required sample size.
  • Use pilot or historical data for standard deviation in mean studies.
  • Add a practical response-loss buffer (for example, +10% to +20%) for real-world collection.

Sources and References

  • Cochran, W. G. Sampling Techniques.
  • Kish, L. Survey Sampling.
  • NIST/SEMATECH e-Handbook of Statistical Methods — Sample Size Determination.

Frequently Asked Questions

Why does sample size matter so much?
Sample size drives statistical precision and decision reliability. Too small a sample increases uncertainty and widens confidence intervals, making conclusions unstable. A properly sized sample improves reproducibility and reduces random noise. In survey and experiment planning, sample size should be set before data collection to align with confidence level, acceptable error, and practical constraints such as budget and timeline.
What is finite population correction?
Finite population correction (FPC) reduces required sample size when your target population is not very large. Standard formulas assume an effectively infinite population. If you sample a sizable fraction of a small population, uncertainty drops faster, and FPC adjusts the estimate accordingly. This is common in internal company surveys, classroom studies, or quality checks where total population size is known.
Why is 50% used as default proportion?
When the true proportion is unknown, p = 0.50 is the most conservative assumption because it maximizes p(1−p), which produces the largest required sample size. Using 50% helps avoid underestimation and protects study quality. If you have historical data suggesting a different expected proportion, you can enter that value to produce a more tailored sample estimate.
How does confidence level affect sample size?
Higher confidence levels require larger sample sizes because they use larger critical values (z). For example, moving from 95% to 99% confidence increases z from 1.96 to 2.576, which can substantially increase required observations. This reflects a tradeoff: more certainty about capturing the true parameter requires more data collection effort.
Can I use this for A/B testing?
Yes, this tool is useful for early planning of A/B tests and conversion studies, especially in proportion mode. However, production-grade experiment design often also needs minimum detectable effect, baseline conversion rate, test power, and multiple-testing controls. Use this as a strong starting estimate, then refine with a dedicated power-analysis workflow when stakes are high.
Should I always round up sample size?
Yes. Sample size formulas often return non-integer values, but data collection is discrete, so always round up to the next whole number. Rounding down can violate your target precision. Many teams also add a non-response buffer (for example 10% to 20%) to maintain effective sample size after dropouts, invalid responses, or missing data.

Related Tools