Statistical Calculators

Sample Size Calculator

Free sample size calculator for surveys and research. Calculate required sample size for proportions, means, and group comparisons.

For finite population correction

Quick Reference: Common Sample Sizes

For Proportions (95% CI, p = 0.5)
±10%
97
±5%
385
±3%
1,068
±1%
9,604
Effect Size Guidelines (Cohen's d)
Small
d = 0.2
Medium
d = 0.5
Large
d = 0.8

How to Use the Sample Size Calculator

This calculator determines the minimum sample size needed for your research or survey. Choose from three calculation types based on your study design.


Sample Size for Proportions

Use this when estimating a percentage or proportion (e.g., survey responses, conversion rates).

Formula

n = (z² × p × (1-p)) / e²

Where:

  • z = z-score for confidence level (1.96 for 95%)
  • p = expected proportion (use 0.5 if unknown)
  • e = margin of error (as decimal)

Quick Reference Table

Margin of Error90% CI95% CI99% CI
±10%6897166
±5%271385664
±3%7521,0681,844
±2%1,6922,4014,148
±1%6,7669,60416,590

Assumes p = 0.5 (maximum variability)


Sample Size for Means

Use this when estimating a continuous variable (e.g., average income, test scores).

Formula

n = (z × σ / e)²

Where:

  • z = z-score for confidence level
  • σ = population standard deviation (estimated)
  • e = desired margin of error (same units as the mean)

Example

To estimate average income within ±5,000with955,000 with 95% confidence, assuming σ = 25,000:

n = (1.96 × 25,000 / 5,000)² = 96 people


Sample Size for Comparing Two Groups

Use this when comparing two independent groups (e.g., treatment vs. control).

Formula

n per group = 2 × ((z_α + z_β) / d)²

Where:

  • z_α = z-score for significance level (e.g., 1.96 for α = 0.05)
  • z_β = z-score for power (e.g., 0.84 for 80% power)
  • d = Cohen’s d (effect size)
  • Result is per group

Effect Size Guidelines (Cohen’s d)

EffectdExample
Small0.2Subtle differences, large overlap
Medium0.5Noticeable difference
Large0.8Obvious difference, little overlap

Sample Sizes for Two-Group Comparison

Effect Size80% Power90% Power
d = 0.2394/group527/group
d = 0.564/group86/group
d = 0.826/group34/group

At α = 0.05, two-tailed


Finite Population Correction

When sampling from a finite population (N), apply the correction:

n’ = n / (1 + (n-1)/N)

This reduces the required sample size when sampling a significant portion of the population.

Example

If you calculate n = 400, but your population is N = 1,000:

n’ = 400 / (1 + 399/1000) = 400 / 1.399 ≈ 286


Factors Affecting Sample Size

FactorEffect on Sample Size
↑ Confidence levelLarger sample needed
↑ Precision (↓ margin of error)Larger sample needed
↑ Expected variabilityLarger sample needed
↑ Effect sizeSmaller sample needed
↑ PowerLarger sample needed

Common Questions

Why use p = 0.5 for proportions?

When you don’t know the expected proportion, 0.5 gives the maximum sample size needed. Any other proportion would require fewer samples.

What confidence level should I use?

  • 90%: Preliminary studies, quick estimates
  • 95%: Standard for most research (recommended)
  • 99%: When high certainty is critical

What is statistical power?

Power is the probability of detecting an effect if it exists. Standard is 80%, but 90% is better for important decisions.

How do I estimate standard deviation?

  • Use data from previous similar studies
  • Conduct a pilot study
  • Use the range/4 as a rough estimate
  • For proportions, use √(p(1-p))

Design Considerations

Practical Sample Size

Always add extra to account for:

  • Non-response (typically 10-50%)
  • Invalid responses
  • Subgroup analysis needs
  • Dropout in longitudinal studies

Adjusted n = n / (1 - expected dropout rate)

Minimum Sample Sizes

  • For normal approximation: n ≥ 30
  • For proportions near 0 or 1: larger n needed
  • For regression: n ≥ 10 × number of predictors

Advertisement

Want to learn the theory?

Our lessons explain the statistical concepts behind this calculator with clear examples.

Browse Lessons →