Skip to main content

How to Calculate Sample Size

What is Sample Size?

Sample size is the number of observations needed in a study to achieve a specified margin of error and confidence level. Larger samples give more precise estimates but cost more to collect. The required n depends on confidence level, expected proportion, and acceptable error.

Step-by-Step Guide

  1. 1For proportions: n = z² × p(1-p) / E²
  2. 2z = 1.96 for 95% confidence · z = 2.576 for 99% confidence
  3. 3p = expected proportion (use 0.5 if unknown — gives maximum n)
  4. 4E = desired margin of error as a decimal (e.g. 0.05 for ±5%)

Worked Examples

Input
95% confidence · ±5% margin · p=0.5
Result
n = 384
1.96²×0.5×0.5/0.05²=384.16 → round up to 384
Input
99% confidence · ±3% margin · p=0.5
Result
n = 1,844
Tighter margin + higher confidence = far more observations

Ready to calculate? Try the free Sample Size Calculator

Try it yourself →

Settings

PrivacyTermsAbout© 2026 PrimeCalcPro