Survey Sample Size Calculator

Calculate n for survey margin of error.

Margin of error must be between 0 and 0.5

Examples:

Enter margin of error to calculate sample size

What Is Survey Sample Size Calculation?

Before conducting a survey, you need to determine how many respondents are required to achieve a desired level of precision. This calculator finds the sample size needed for a specified margin of error.

Key question: "How many people do I need to survey to estimate the proportion within ±3%?"

The Key Inputs

Margin of Error (Precision)

How close your estimate should be to the true value:

  • ±3%: Standard for major polls
  • ±5%: Common for market research
  • ±10%: Acceptable for exploratory surveys

Smaller margins require larger samples.

Confidence Level

How confident you want to be that the true value falls within your margin:

  • 95%: Standard (z* = 1.96)
  • 99%: More confident, larger sample (z* = 2.576)
  • 90%: Less confident, smaller sample (z* = 1.645)

Expected Proportion

If you're estimating a proportion, your best guess at the true value:

  • Use 50% if unknown (maximizes required sample size)
  • Use pilot data or prior research if available

Population Size (Optional)

For small populations, the finite population correction reduces required sample size.

The Formula

For infinite population:

n = (z*)² × p(1-p) / E²

Where:

  • z* = critical value (1.96 for 95%)
  • p = expected proportion (0.5 if unknown)
  • E = margin of error (as decimal)

For finite population N:

n_adjusted = n / [1 + (n-1)/N]

Sample Size Tables

For 95% Confidence, p = 50%

Margin of ErrorSample Size
±10%97
±5%385
±3%1,068
±2%2,401
±1%9,604

Effect of Population Size (95% CI, ±5%, p = 50%)

PopulationRequired Sample
500218
1,000278
5,000357
10,000370
100,000383
Infinite385

For populations above 20,000, the finite population correction is negligible.

Practical Examples

National Opinion Poll

"Estimate presidential approval within ±3%"

p = 50% (unknown), 95% confidence n = 1,068 respondents

Customer Satisfaction Survey

"Company has 5,000 customers. Estimate satisfaction within ±5%"

Population = 5,000, p = 50%, 95% confidence n = 357 respondents

Product Preference Study

"Prior research suggests 30% prefer our brand. Estimate within ±4%"

p = 30%, 95% confidence n = 504 respondents

Less than the 600 needed if p were unknown (50%).

Why 50% Maximizes Sample Size

The formula includes p(1-p), which is maximized at p = 0.5:

True pp(1-p)Sample needed (±5%, 95% CI)
10%0.09139
30%0.21323
50%0.25385
70%0.21323
90%0.09139

Using p = 50% is conservative—you'll have adequate precision regardless of the actual proportion.

Accounting for Response Rates

If you expect only a fraction of invitees to respond:

Invitations needed = Sample size / Response rate

Example:

  • Need: 400 responses
  • Expected response rate: 25%
  • Send: 400 / 0.25 = 1,600 invitations

Subgroup Analysis

If you plan to analyze subgroups separately:

Each subgroup needs its own adequate sample.

Example:

  • Main analysis: n = 400
  • Also analyze by gender (2 groups): Need n = 400 per group
  • Total needed: 800 (or proportionally more)

Stratified Sampling

For populations with distinct strata:

  1. Determine sample size for each stratum
  2. Sample proportionally or optimally across strata
  3. Combine with appropriate weighting

Complex Survey Designs

Standard formulas assume simple random sampling. Adjustments needed for:

Cluster sampling: Multiply by design effect (often 1.5-2.5) Stratification: May reduce required sample size Weighting: Effective sample size may be smaller than actual

Common Mistakes

Ignoring Non-Response

Planning for 400 but achieving only 200 compromises precision.

Not Accounting for Clusters

Surveying students by classroom (cluster) requires larger samples than simple random sampling.

Overconfidence in Pilot Data

Small pilots have high variability. Be conservative with p estimates.

Forgetting Practical Constraints

Sample size calculation gives a minimum. Budget, time, and access may dictate actual sample.

Survey vs. Experiment

Survey (estimation): "What proportion supports the policy?" Focus on margin of error.

Experiment (comparison): "Does Treatment A differ from B?" Focus on power and effect size.

This calculator is for estimation. For comparison, use Sample Size for Two Proportions.

Historical Context

Sample size determination became systematic in the 1930s-40s with the development of survey methodology.

George Gallup demonstrated scientific polling could predict elections with just a few thousand respondents—far fewer than the Literary Digest's 2.4 million (which failed spectacularly in 1936).

The key insight: Random selection matters more than sample size. A biased sample of millions fails where a random sample of thousands succeeds.

Related Calculations

Summary

Survey sample size calculation balances precision needs against practical constraints. The margin of error decreases with √n, so halving the margin requires quadrupling the sample. For proportions near 50%, maximum sample size is needed; for extreme proportions, less. Always account for expected non-response by inflating your target. And remember: sample size formulas assume random sampling—biased selection invalidates all precision claims.