Sample Size Calculator

  1. z (95%) = 1.96
  2. n = (z² × p × (1−p)) / E² = (1.96² × 0.5 × 0.5) / 0.05²
  3. n = 384.16
  4. Recommended sample size (rounded up): 385
Recommended n = 385
ResultValue
Raw sample size384.16
Recommended (rounded up)385
ScenarioSample size
90% conf., E=0.05, p=0.5271
90% conf., E=0.03, p=0.5752
95% conf., E=0.05, p=0.5385
95% conf., E=0.03, p=0.51068
99% conf., E=0.05, p=0.5664
99% conf., E=0.01, p=0.516590

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

How Sample Size Is Determined

Before conducting a survey or poll, you need enough respondents so that your estimate is precise enough to be useful. Sample size formulas balance three inputs: the desired confidence level (how sure you want to be), the margin of error E (maximum expected difference between your sample statistic and the true population value), and the expected proportion p (for yes/no questions). The result tells you how many people to survey — always rounded up to a whole number because you cannot interview a fraction of a person.

For estimating a population proportion, the standard formula is n = (z² × p × (1 − p)) / E². Here z is the critical value from the normal distribution: z = 1.645 for 90% confidence, z = 1.96 for 95%, and z = 2.576 for 99%. The proportion p represents your best guess of the true rate — often 0.5 when unknown because p(1 − p) is maximized at 0.25, giving the most conservative (largest) sample size. Margin of error E is expressed as a decimal: 5% means E = 0.05.

The classic benchmark: 95% confidence, 5% margin of error, p = 0.5. Substituting: n = (1.96² × 0.5 × 0.5) / 0.05² = (3.8416 × 0.25) / 0.0025 = 0.9604 / 0.0025 = 384.16, rounded up to 385 respondents. Tighter margins require quadratically more respondents — halving E from 5% to 2.5% quadruples n. Higher confidence (99% vs 95%) also increases n because z grows.

When sampling from a finite population of size N (e.g., all 500 employees), apply the finite population correction: n_adj = n / (1 + (n − 1) / N). This reduces the required sample when N is small relative to n. For N = 500 and raw n = 385, the adjusted size drops noticeably because you are sampling a large fraction of the population.

These formulas assume simple random sampling, independent responses, and that np and n(1 − p) are both at least 5–10 for normal approximation validity. For mean estimation (continuous data), a different formula uses expected standard deviation instead of p. Pair results with the confidence interval calculator to verify the interval width after collecting data, and the probability calculator for underlying proportion math.

Planning sample size before data collection prevents underpowered studies that waste resources and overpowered studies that overspend. Enter your confidence level, margin of error, estimated proportion, and optional population size — the calculator shows raw n, adjusted n, and recommended rounded sample size with full substitution steps.

Examples

ExampleResult
95% confidence, 5% margin, p=0.5n ≈ 385
90% confidence, 5% margin, p=0.5n ≈ 271
95% confidence, 3% margin, p=0.5n ≈ 1068
99% confidence, 5% margin, p=0.5n ≈ 664
95%, E=0.05, p=0.3n ≈ 323
95%, E=0.05, p=0.5, N=500n_adj < 385
95%, E=0.10, p=0.5n ≈ 97

Frequently asked questions

p = 0.5 maximizes p(1 − p), giving the largest (most conservative) required sample size when you have no prior estimate.

With p = 0.5, n ≈ 385. The exact raw value is 384.16, always rounded up.

When sampling without replacement from a small known population N, n_adj = n / (1 + (n−1)/N) reduces the required sample.

Related calculators