Free Sample Size Calculator
G*Power-verified formulas for surveys, experiments, clinical trials, correlations & prevalence studies. Generates thesis-ready methodology paragraphs.
⬆ Rounding policy: All results use conservative ceiling rounding (always rounds up to next whole person). This may show 385 where some tools show 384 for the classic survey benchmark — see FAQ below for a detailed explanation.
What Is Sample Size and Why Does It Matter?
Sample size refers to the number of participants, observations, or data points required in a study to produce statistically meaningful and reliable results. It is one of the most critical decisions in research design — affecting everything from statistical power to budget planning and ethical approval.
An underpowered study (too few participants) risks missing real effects entirely, wasting time and resources on inconclusive results. An overpowered study (too many participants) exposes unnecessary participants to potential risks, consumes excessive resources, and may detect trivially small effects that lack practical significance.
Proper sample size calculation strikes the optimal balance — ensuring your study has adequate statistical power to detect meaningful effects while remaining feasible within your budget and timeline. This calculator uses formulas verified against G*Power 3.1 (47/47 test cases matched), WHO STEPS tables, and OpenEpi.
Whether you are conducting a cross-sectional survey, a randomized controlled trial, or a correlational study, getting the sample size right is essential for producing credible, publishable, and ethically defensible research. Regulatory bodies such as the FDA, EMA, and institutional review boards (IRBs) routinely require a formal sample size justification as part of study approval.
Why Use This Sample Size Calculator?
Most online calculators handle only one study type or lack transparency about their formulas. This calculator is built by researchers, for researchers — covering five study designs with full formula disclosure and academic references.
Unlike many alternatives, this tool applies the design effect (DEFF) before the finite population correction (FPC), which is the mathematically correct order recommended by the WHO and CDC. Applying DEFF after FPC — a common error in other calculators — can produce systematically incorrect results, especially for cluster-sampled surveys with small populations.
Additionally, this calculator uses conservative ceiling rounding at every step. Rather than rounding to the nearest integer (which could leave you below the required sample), every fractional result is rounded up to the next whole person. This ensures the actual margin of error never exceeds the specified target — a property that some other calculators sacrifice for "cleaner" numbers.
5 Study Types
Surveys, experiments, clinical trials, correlations, and prevalence studies — all in one tool.
G*Power Verified
47/47 test cases match G*Power 3.1. Cross-referenced with WHO STEPS and OpenEpi.
Thesis-Ready Output
Generates methodology paragraphs with formulas, variables, and academic references you can copy directly.
Sensitivity Table
See how sample size changes across different confidence levels and power values at a glance.
Attrition Pipeline
Adjust for screening exclusions and dropout rates with a visual recruitment pipeline and sequential ceiling rounding.
100% Private
Runs entirely in your browser. No data sent to servers, no signup, no tracking.
Supported Study Types & Formulas
1. Survey / Questionnaire — Cochran's Formula (1977)
The most widely used formula for determining sample size for surveys, polls, and questionnaires. Cochran's formula assumes simple random sampling and estimates the sample needed to achieve a desired margin of error around a population proportion.
With DEFF: n₀_deff = ⌈n₀ × DEFF⌉
With FPC: n = ⌈n₀_deff / (1 + (n₀_deff − 1) / N)⌉
Variables: z = z-score for confidence level, p = expected proportion (use 0.5 for maximum variability), e = margin of error, N = population size, DEFF = design effect for cluster sampling
Note: ⌈·⌉ = ceiling function (always rounds up). DEFF is applied before FPC per WHO/CDC methodology.
2. Experiment / Two Groups — Cohen's d
Calculates per-group sample size for comparing two independent groups (e.g., treatment vs. control). Based on the standardized mean difference (Cohen's d), this formula uses the normal approximation to determine the number of participants needed in each group.
Total: N_total = n × 2
Variables: z_α = z-score for significance level (two-tailed by default), z_β = z-score for power, d = Cohen's effect size (small=0.2, medium=0.5, large=0.8)
Note: Uses normal approximation. May differ by ±1 from G*Power's non-central t-distribution method.
3. Clinical / Health Study — Kelsey-Schlesselman (1982)
Supports both dichotomous endpoints (mortality, cure rates) and continuous endpoints with unequal allocation ratios. This formula is the standard for clinical trial sample size determination and is used by regulatory agencies worldwide.
Continuous: n₁ = ⌈(1+1/k) × ((z_α + z_β) / (Δ/σ))²⌉
Pooled proportion: p̄ = (p₁ + k·p₂) / (1 + k) — correctly weighted for unequal allocation
Total: N_total = n₁ + n₂ (where n₂ = ⌈k × n₁⌉)
Variables: k = allocation ratio (n₂/n₁), p₁/p₂ = group proportions, Δ = mean difference, σ = standard deviation
4. Correlation / Regression — Fisher z-Transform
Uses Fisher's z-transformation because Pearson's r is not normally distributed, especially for values far from zero. The transformation stabilizes the variance, allowing use of the standard normal distribution for sample size calculations.
Where: z_r = arctanh(r) = 0.5 × ln((1+r)/(1−r))
With DEFF: n_deff = ⌈n × DEFF⌉ (applied to full n including +3 correction)
Valid range: 0 < r < 1 (r = 0 or r = 1 produce undefined results)
Benchmarks: weak (r=0.1), moderate (r=0.3), strong (r=0.5) per Cohen (1988)
5. Prevalence / Proportion Study
Estimates how common a condition, behavior, or characteristic is in a population. Standard in epidemiology and public health. Uses the same underlying Cochran formula as surveys, but is framed specifically for prevalence estimation with appropriate terminology.
With DEFF: n_deff = ⌈n × DEFF⌉
With FPC: n_adj = ⌈n_deff / (1 + (n_deff−1) / N)⌉
Note: DEFF applied before FPC. Common use: WHO STEPS surveys, disease prevalence, behavioral surveillance
Key Statistical Concepts Explained
Confidence Level (α)
The probability that your confidence interval contains the true population parameter. 95% is standard for most research. Use 99% for high-stakes decisions (clinical trials, regulatory submissions) and 90% for exploratory or pilot studies. The confidence level determines the z-score used in the calculation: 1.645 for 90%, 1.960 for 95%, and 2.576 for 99%.
Statistical Power (1−β)
The probability of correctly detecting a true effect when one exists. 80% is the minimum standard recommended by Cohen (1988); 90% is preferred for most research. A study with 80% power has a 20% chance of missing a real effect (Type II error). Increasing power from 80% to 90% typically requires approximately 30% more participants, but substantially reduces the risk of a false negative conclusion.
Effect Size
Quantifies the magnitude of difference you expect to detect. Cohen's (1988) benchmarks for d: small (0.2) — subtle, requires large samples; medium (0.5) — noticeable, standard default; large (0.8) — obvious, requires smaller samples. Always prefer pilot data or prior literature over arbitrary benchmarks. For correlations, the benchmarks are: weak (r=0.1), moderate (r=0.3), and strong (r=0.5).
Margin of Error (e)
The maximum acceptable difference between your sample estimate and the true population value. ±5% is standard for most surveys. Tighter margins (±3% or ±2%) quadruple or more the required sample size — use only when precision is critical. The margin of error is inversely related to the square root of sample size, which means halving the margin requires quadrupling the sample.
Design Effect (DEFF)
Adjusts for the loss of efficiency in cluster sampling compared to simple random sampling. DEFF = 1.0 for SRS (no adjustment). For cluster designs (e.g., sampling schools, clinics, villages), typical DEFF ranges from 1.5 to 3.0 depending on intra-cluster correlation (ICC). The formula is DEFF = 1 + (m − 1) × ICC, where m is the average cluster size. Important: This calculator correctly applies DEFF before the finite population correction, following WHO and CDC methodology. Many other calculators incorrectly reverse this order.
Finite Population Correction (FPC)
When sampling from a known, finite population, the required sample size can be reduced because each sampled unit represents a larger fraction of the total. The FPC formula is: n_adj = n / (1 + (n − 1) / N). This correction becomes meaningful when the sample exceeds about 5% of the population. For very large or unknown populations, FPC has negligible effect and can be omitted by leaving the population size at zero (infinite).
Attrition Adjustment
Accounts for participant dropout and screening exclusions. Screening exclusion (5–15% typical): participants who don't meet eligibility criteria. Dropout rate (10–30% typical): enrolled participants who withdraw or become unreachable. This calculator applies both adjustments sequentially with ceiling rounding at each step: Recruitment target = ⌈⌈Core sample ÷ (1 − screening rate)⌉ ÷ (1 − dropout rate)⌉. This ensures you never under-recruit even by one person.
Conservative Ceiling Rounding
This calculator always rounds up to the next whole number (ceiling function) at every computation step. For example, Cochran's formula with z = 1.95996 gives n₀ = 384.16 for the classic survey benchmark (95% CI, p = 0.5, e = ±5%), which becomes 385 after ceiling. Some other tools report 384 because they use a truncated z = 1.96 (which gives exactly 384.00) or use rounding instead of ceiling. Our approach guarantees the actual margin of error never exceeds the specified target — a more conservative and statistically rigorous choice. Both G*Power 3.1 and OpenEpi use the same ceiling approach and also report 385.
Who Uses a Sample Size Calculator?
Proper sample size determination is required across virtually every research discipline:
Whether you're writing a thesis methodology chapter, preparing an IRB/ethics application, designing a randomized controlled trial, or planning a national health survey, this calculator provides the statistical rigor your work demands — with output you can cite directly.
Frequently Asked Questions
Related Tools You May Like
Explore more free calculators and tools on ResearchToolsLab: