📐 Math CalculatorsFree · No signup

Sample Size Calculator

Calculate the required sample size for surveys and research studies. Find minimum sample size for statistical significance.

About the Sample Size Calculator

A sample size calculator determines how many observations you need to collect to achieve statistically valid conclusions with your desired level of confidence and precision. Sample size is one of the most critical decisions in research design, survey planning, clinical trials, quality control, and A/B testing — too small a sample produces unreliable results with wide confidence intervals; too large wastes resources and time. Our free sample size calculator handles the three most common scenarios: estimating a population mean with a specified margin of error, estimating a population proportion (percentage) with a specified margin of error, and comparing two groups to detect a specified effect size with desired statistical power. It accepts your confidence level (typically 90%, 95%, or 99%), margin of error or minimum detectable effect, expected variability, and population size for finite population correction, returning the minimum sample size needed.

Formula

Proportion: n = z^2 x p(1-p) / E^2 | Mean: n = (z x sigma / E)^2 | Finite correction: n_adj = n/(1 + (n-1)/N)

How It Works

For estimating a population proportion (most common for surveys): n = (z^2 x p x (1-p)) / E^2, where z is the critical value (1.96 for 95% confidence), p is the expected proportion (use 0.5 for maximum sample size when unknown), and E is the desired margin of error. Example: 95% confidence, +/-3% margin of error, unknown proportion: n = (1.96^2 x 0.5 x 0.5) / 0.03^2 = (3.8416 x 0.25) / 0.0009 = 0.9604 / 0.0009 = 1,068 respondents. For estimating a population mean: n = (z x sigma / E)^2, where sigma is the expected standard deviation and E is the desired margin of error. For comparing two groups (clinical trials): n = 2 x ((z_alpha + z_beta) / effect_size)^2, incorporating desired power (typically 80% or 90%) and the minimum clinically meaningful difference.

Tips & Best Practices

  • Rule of thumb for survey sample sizes: for a national survey (large population) at 95% confidence and +/-3% margin of error, you need approximately 1,068 respondents regardless of the population size — population size above ~20,000 barely affects required sample size.
  • The most conservative assumption is p = 0.5 (50%) for proportion estimates — this maximises the sample size needed and ensures your estimate will be adequately precise regardless of the true proportion.
  • Statistical power (1 - beta): the probability that your study will detect a true effect if one exists. Most clinical trials target 80% power (one-in-five chance of missing a real effect); 90% power is more conservative and requires approximately 30% more subjects.
  • Effect size: smaller effects require larger samples to detect reliably. A drug that reduces blood pressure by 2 mmHg needs a much larger trial than one that reduces it by 15 mmHg, because the smaller effect is harder to distinguish from random variation.
  • Attrition adjustment: in longitudinal studies and clinical trials, participants drop out. Inflate your calculated sample size by the expected dropout rate — if you need 100 completers and expect 20% dropout, recruit 125.
  • A/B testing: for web conversion rate testing, required sample size depends on current baseline conversion rate, desired minimum detectable improvement, and confidence level. A 2% baseline rate trying to detect a 10% relative improvement (to 2.2%) requires far more traffic than a 10% baseline trying to detect the same relative improvement.
  • Stratified sampling: if you plan to analyse subgroups separately (by age group, region, etc.), each subgroup needs the full calculated sample size — not just the overall total divided by the number of subgroups.
  • Finite population correction: if your population is small (typically N < 10,000), the formula above overestimates required sample size. The corrected formula gives a smaller required n, accounting for the fact that a sample represents a larger fraction of the total population.

Who Uses This Calculator

Academic researchers design studies with appropriate statistical power using sample size calculations, which are required in grant applications and ethics review submissions. Market researchers and pollsters calculate the minimum survey sample size needed to achieve reportable precision and plan fieldwork budgets accordingly. Clinical trial investigators perform power calculations to justify their protocol sample size to regulatory agencies (FDA, EMA) and IRBs. Quality engineers determine inspection sample sizes for acceptance sampling plans. A/B testers in product and marketing teams calculate minimum traffic needed before a test result is conclusive. Public health officials calculate survey sizes for prevalence estimates of health conditions. Education researchers design intervention studies with adequate power to detect meaningful learning outcome differences.

Optimised for: USA · Canada · UK · Australia · Calculations run in your browser · No data stored

Frequently Asked Questions

How many samples do I need for a survey?

For a population of 10,000 with 5% margin of error and 95% confidence, you need approximately 370 respondents.