Sample Size Calculator
Statistical power analysis for research studiesChoose Your Starting Point
Select the approach that best fits your needs
Start with Templates
Quick start for common study designs
Choose from pre-configured templates for typical research scenarios. Parameters include suggested values from published literature.
- Clinical trials & medical research
- Survey & market research studies
- Diagnostic test evaluations
- Pre-filled with typical values
Custom Calculator
Full control for experienced users
Complete calculator with all parameters exposed. Best for statisticians and researchers who know their exact requirements.
- All calculation types available
- Advanced statistical options
- Direct access to all inputs
- Maximum flexibility & control
Help Me Decide
Guided setup for specific needs
Answer questions about your study design and we'll determine the right calculation type, formula, and settings for you.
- Identifies correct formula needed
- Determines appropriate settings
- Routes to matching template
- No statistical expertise required
Select a Study Template
Choose the template that matches your research design
Custom Sample Size Calculator
Configure all parameters for your specific study
Let's Determine Your Calculation Needs
Answer these questions to identify the right formula and settings
✓ Based on your answers:
Introduction to the Sample Size Calculator for Research
Sample size calculation is a fundamental step that determines how many participants are needed for reliable, statistically significant results. Whether you need a sample size calculator for a clinical trial, a cross-sectional study, or other observational research, proper estimation ensures your study has adequate statistical power while making efficient use of resources.
This comprehensive guide explains how to use our free sample size calculator for research, understand the underlying statistical principles, and apply these concepts to real-world scenarios. Whether you need a sample size calculator for a comparative study or a more complex design, this tool implements peer-reviewed formulas from biostatistical literature to support researchers, students, and healthcare professionals.
✓ What Our Sample Size Calculator Offers
- A sample size calculator for clinical trials, including RCTs and comparative studies.
- Modules for various designs: a sample size calculator for cohort study, case-control study, and prevalence study.
- Functionality as a sample size calculator for two proportions and for correlation.
- Advanced features: clustering adjustment, finite population correction, dropout planning.
- Free access for academic and non-commercial research.
“Sample size calculation is not merely a statistical exercise but a critical ethical imperative to ensure studies are neither underpowered (risking false negatives) nor overpowered (exposing unnecessary participants to research risks).”
— Andrade C. Sample Size and its Importance in Research. Indian J Psychol Med. 2020 Jan 6
Getting Started with Sample Size Calculation
Before using the calculator, you’ll need to determine several key parameters for your study. Understanding these inputs is essential for accurate sample size estimation.
Essential Parameters You’ll Need
Effect Size
The minimum difference you want to detect between groups. This should be clinically or practically meaningful, not just statistically detectable. Example: 10 mmHg reduction in blood pressure.
Statistical Power
Probability of detecting a real effect. Standard is 80% (0.80), meaning 80% chance of finding a significant result if the effect truly exists. Higher-stakes studies use 90%.
Significance Level (Alpha)
Acceptable false positive rate, typically 0.05 (5%). This means you accept a 5% chance of finding a “significant” result when no real effect exists.
Variability (SD)
Expected standard deviation from pilot studies or published literature. Higher variability requires larger samples to detect the same effect size.
⚠️ Common Beginner Mistakes
- Using effect sizes that are too small: Just because you can detect a 1 mmHg blood pressure difference doesn’t mean it’s clinically meaningful.
- Ignoring dropout rates: If 20% of participants typically drop out, you must recruit extra participants.
- Forgetting clustering: Multi-site studies require adjustment for site-level clustering effects.
- Wrong study design selection: A sample size calculator for a non-inferiority trial has different requirements than one for a superiority trial.
Basic Workflow: Three Simple Steps
Step 1: Select Your Study Design
Choose the design that matches your research question. For most clinical trials testing if a new treatment works better, select “Two Groups – Superiority.” For diagnostic test validation, choose “Diagnostic Accuracy.”
Step 2: Enter Study Parameters
Input your expected effect size, variability estimates, desired power, and significance level. The calculator provides guidance and typical values for common therapeutic areas.
Step 3: Review and Adjust
Examine the calculated sample size and interpretation. If it seems too large or small, review your assumptions. Consider adjusting dropout rate, clustering, or finite population correction if applicable.
A Sample Size Calculator for Various Study Designs
Our tool is a versatile sample size calculator for various study designs, including those common in clinical and health sciences research. From a sample size calculator for rct to one for observational studies, each module uses validated formulas from statistical literature, cited throughout this documentation.
Sample Size Calculator for Clinical Trials (RCT) & Comparative Study
Clinical trials are the gold standard for testing medical interventions. Our sample size calculator for clinical trials supports three types of comparisons, each with distinct statistical requirements, making it an effective sample size calculator for a comparative study.
Superiority Trials (A Common Use for a Sample Size Calculator for Two Proportions)
Used when you want to prove a new treatment is better than existing treatment or placebo. This is the most common clinical trial design.
Formula for continuous outcomes (e.g., blood pressure, cholesterol):
Where: Zα/2 is the critical value for two-sided significance test, Zβ corresponds to desired power, σ is the standard deviation, and δ is the expected difference (effect size).
“This formula provides the number of participants needed per group for a two-sample t-test or equivalent analysis, assuming equal allocation and normally distributed outcomes.”
— Nae-Yuh Wang, PhD (Associate Professor of Medicine, Biostatistics & Epidemiology) – Johns Hopkins
Example: Testing if a new blood pressure medication reduces systolic BP by at least 10 mmHg compared to placebo, with an expected SD of 15 mmHg, 80% power, and two-sided alpha of 0.05, requires approximately 142 participants per group (284 total).
Non-Inferiority Trials
Used when you want to show a new treatment is not worse than the standard treatment by more than a pre-specified margin. Common for generic drug approval or alternative therapies that may have other advantages (lower cost, fewer side effects).
Formula for non-inferiority trials:
Key difference: Non-inferiority uses one-sided testing (Zα not Zα/2), and the denominator includes the margin (δ) minus the expected difference. The margin must be clinically justified and larger than any expected difference.
⚠️ Important for Non-Inferiority Studies
The non-inferiority margin (δ) must be larger than the expected difference between treatments. If you expect treatments to differ by 2 units, your margin might be 5 units. Regulatory agencies require clinical justification for the margin choice.
Example: Showing a generic antibiotic is non-inferior to the brand-name version, with a non-inferiority margin of 10% cure rate difference. If you expect no difference (0%) with SD of 25%, and set margin at 10%, the study requires specific sample size based on this margin.
Equivalence Trials
Used to demonstrate two treatments are clinically equivalent (not different by more than a margin in either direction). This requires testing both directions simultaneously.
Example: Proving a biosimilar insulin has equivalent glycemic control to the reference product, typically within a ±10% margin.
Sample Size Calculator for Cross-Sectional & Prevalence Study
Our sample size calculator for cross-sectional study designs is ideal for validating medical tests, imaging procedures, or screening tools. It calculates sensitivity and specificity. This is also the correct tool to use as a sample size calculator for a prevalence study.
Calculating Sample Size for Two Proportions (Sensitivity/Specificity)
Formula for diseased participants (sensitivity):
Formula for healthy participants (specificity):
“These formulas provide the number of diseased and non-diseased participants needed to estimate sensitivity and specificity with desired precision (half-width of confidence interval).”
— Jacob Shreffler, Martin R. Huecker – University of Louisville School of Medicine.
Example: Validating a new rapid COVID-19 test expected to have 90% sensitivity and 85% specificity, with ±3% precision. This requires approximately 385 COVID-positive patients and 545 COVID-negative patients.
Using the Sample Size Calculator for Case-Control Study Designs
Diagnostic studies often use a case-control approach. Our sample size calculator for case control study designs helps you determine how many diseased cases and healthy controls to recruit. This method is more efficient than screening a large population but requires careful consideration of disease prevalence.
Accounting for Disease Prevalence
If recruiting from a general population, you must account for disease prevalence. For a disease with 5% prevalence, screening 1,000 people yields approximately 50 cases and 950 controls. Our calculator provides estimated screening requirements based on prevalence.
Sample Size Calculator for Cohort & Case-Control Study
Survival analysis is used when the outcome is time until an event occurs (death, disease progression). Our sample size calculator for cohort study designs is perfect for these time-to-event studies, common in oncology, cardiology, and chronic disease research.
Hazard Ratio and Event Calculations
Formula for required events:
Where HR is the hazard ratio (relative risk over time). A HR of 0.75 means 25% risk reduction in the treatment group compared to control. The natural logarithm [ln(HR)] transforms this ratio for calculation.
“This formula, derived from asymptotic theory for the log-rank test, calculates the number of events needed to detect a specified hazard ratio with given power and significance level.”
After calculating required events, you must determine sample size based on expected event rate. If you need 200 events and expect 30% of participants to experience the event during follow-up, you need approximately 667 participants.
Example: An oncology trial testing if a new drug reduces cancer progression risk by 25% (HR=0.75), with 80% power and two-sided alpha of 0.05, requires 353 progression events. If the expected 3-year progression rate is 40%, approximately 883 patients must be enrolled.
Statistical Methodology and Formulas
This section provides technical details about the statistical methods implemented in the calculator. All formulas are derived from peer-reviewed literature and represent standard approaches in biostatistical practice.
Understanding Statistical Power
Statistical power is the probability that your study will detect an effect if it truly exists. It’s calculated as 1 – β, where β is the Type II error rate (false negative rate).
80% Power (Standard)
Most clinical trials use 80% power. This means accepting a 20% chance of missing a real effect (Type II error). Zβ = 0.842
90% Power (High)
Recommended for pivotal trials or confirmatory studies where missing an effect is particularly costly. Zβ = 1.282
95% Power (Very High)
Used for critical regulatory submissions or when consequences of missing an effect are severe. Zβ = 1.645
Type I and Type II Errors
Sample size calculation balances two types of errors:
- Type I Error (α): False positive – concluding there’s an effect when there isn’t. Set by significance level, typically 0.05 (5% chance).
- Type II Error (β): False negative – missing a real effect. Controlled by power, typically 0.20 (20% chance), giving 80% power.
“The choice of α and β reflects the relative importance of avoiding false positives versus false negatives. Medical research typically prioritizes avoiding false positives (α=0.05) while accepting a moderate risk of false negatives (β=0.20).”
Effect Size and Clinical Significance
The effect size should represent the minimum clinically important difference – the smallest effect that would change clinical practice or patient decisions. Statistical significance alone is not sufficient; the effect must be meaningful.
Cohen’s d is a standardized measure of effect size calculated as: d = (mean difference) / standard deviation. Guidelines suggest:
- Small effect: d ≈ 0.2
- Medium effect: d ≈ 0.5
- Large effect: d ≈ 0.8
However, these are general guidelines. Clinical significance depends on context. A small statistical effect might be clinically important for prevalent diseases or preventive interventions.
Advanced Features for Complex Studies
Beyond basic sample size calculation, the calculator supports adjustments for real-world research complexities including participant dropout, clustering in multi-site studies, and finite population constraints.
Finite Population Correction (FPC)
When sampling from a limited population (e.g., single hospital, small community), standard formulas may overestimate required sample size. The finite population correction adjusts for this.
Finite Population Correction formula:
Where n is the calculated sample size and N is the population size. FPC is typically applied when the sampling fraction (n/N) exceeds 5%.
Example: A study calculated requiring 400 participants, but your hospital only has 800 eligible patients. With FPC: 400 / [1 + 399/800] = 267 participants.
⚠️ When FPC is Not Appropriate
If the calculated sample size exceeds the available population, FPC cannot make the study feasible. The calculator will alert you to this situation and suggest alternatives like multi-center collaboration or adjusting study parameters.
Clustering Adjustment (Design Effect)
Multi-site studies (multiple hospitals, clinics, or schools) require adjustment for clustering because participants within the same site tend to be more similar than participants from different sites. This reduces effective sample size.
Design Effect formula:
Where m is the cluster size (participants per site) and ICC is the intraclass correlation coefficient (0 to 1), measuring similarity within clusters. Typical ICC values range from 0.01 to 0.05 in healthcare settings.
The adjusted sample size is: nadjusted = nbase × DE
Example: A 10-hospital study with 30 patients per hospital (m=30) and ICC=0.03 has a design effect of 1 + (30-1) × 0.03 = 1.87. If the base calculation requires 200 participants, the clustered study needs 200 × 1.87 = 374 participants.
“Ignoring clustering in multi-site trials can lead to seriously underpowered studies. The design effect quantifies the inflation in sample size needed to account for correlation within clusters.”
— Emilie Vierron & Bruno Giraudeau, BMC Medical Research Methodology – Article number: 39 (2009)
Dropout Rate Adjustment
Participant attrition (dropout, loss to follow-up, protocol deviation) reduces effective sample size. You must recruit extra participants to maintain adequate statistical power.
Dropout adjustment formula:
Example: Your study needs 200 completers. With an expected 15% dropout rate: 200 / (1 – 0.15) = 235 participants to recruit initially.
Typical dropout rates by study type:
- Short-term trials (<3 months): 10-15%
- Medium-term trials (3-12 months): 15-20%
- Long-term trials (>1 year): 20-30%
- Online surveys: 30-50%
Note on Diagnostic Studies
Dropout adjustment is typically not applied to case-control diagnostic studies because if a participant drops out, they are simply replaced until the target number of cases and controls is reached. This differs from longitudinal clinical trials where replacements are not feasible.
Sample Size Calculator for Correlation
For researchers examining the relationship between two continuous variables, our tool also functions as a sample size calculator for correlation analysis. It helps determine the number of subjects needed to detect a statistically significant correlation coefficient (e.g., Pearson’s r) with a specified level of power.
Unequal Allocation Ratios
Some studies use unequal allocation (e.g., 2:1 randomization with twice as many participants receiving the intervention as the control). This may be done for ethical reasons, cost considerations, or recruitment feasibility.
Unequal allocation requires more total participants than 1:1 allocation for the same power. The calculator implements the Casagrande method (1978) for proportions and standard adjustments for continuous outcomes.
Example: A study with 1:1 allocation requires 100 per group (200 total). The same study with 2:1 allocation requires approximately 133 in the intervention group and 67 in control (200 total), but with slightly reduced power compared to 1:1 with the same total.
Clinical Use Cases and Examples
These real-world examples demonstrate how to apply sample size calculation to common research scenarios in clinical and health sciences.
Example 1: Hypertension Drug Trial (RCT)
Scenario: A pharmaceutical company wants to test if a new ACE inhibitor reduces systolic blood pressure more than standard therapy.
Study Design: Randomized controlled trial (a key use for a sample size calculator for rct), superiority design, two groups (1:1 allocation)
Parameters:
- Expected effect size: 10 mmHg reduction (clinically meaningful)
- Standard deviation: 15 mmHg (from pilot study)
- Power: 80% (standard for Phase III trials)
- Significance: 0.05 two-sided
- Dropout rate: 15% (typical for 6-month trial)
Calculation: Base sample size = 142 per group. With 15% dropout: 142 / 0.85 = 167 per group. Total enrollment: 334 participants
Result: The study enrolled 340 participants (170 per group) and successfully demonstrated a 12 mmHg mean reduction (p=0.003), leading to regulatory approval.
Example 2: Rapid Diagnostic Test Validation
Scenario: A laboratory developed a rapid point-of-care test for detecting influenza and needs to validate its accuracy against PCR gold standard.
Study Design: Diagnostic accuracy study (a type of cross-sectional study)
Parameters:
- Expected sensitivity: 90%
- Expected specificity: 85%
- Desired precision: ±3%
- Confidence level: 95%
- Influenza prevalence: 20% during flu season
Calculation: Using the sample size calculator for a cross-sectional study, it requires 385 influenza-positive patients and 545 influenza-negative patients. With 20% prevalence, screening approximately 2,000 patients is needed.
Result: The study recruited 400 positive and 560 negative cases, finding actual sensitivity of 92% (95% CI: 89-95%) and specificity of 87% (95% CI: 84-90%), supporting regulatory clearance.
Example 3: Multi-Site Quality Improvement Study
Scenario: A hospital network wants to test if a new nurse-led intervention reduces 30-day readmission rates across 8 hospitals.
Study Design: Cluster randomized trial (hospitals as clusters), superiority design
Parameters:
- Control group readmission rate: 20%
- Intervention group target rate: 15% (5% absolute reduction)
- Power: 80%
- Significance: 0.05 two-sided
- Cluster size: 50 patients per hospital
- ICC: 0.02 (typical for hospital-level clustering)
Calculation: Base sample size (ignoring clustering) = 388 per group. Design effect = 1 + (50-1) × 0.02 = 1.98. Adjusted sample size = 388 × 1.98 = 768 per group. Total: 1,536 patients (192 per hospital across 8 hospitals)
Result: The study enrolled 1,600 patients and found a significant reduction in readmissions to 16.2% (p=0.04), demonstrating the intervention’s effectiveness and supporting system-wide implementation.
Glossary of Statistical Terms
This glossary defines key statistical and clinical research terms used throughout this documentation and in the calculator interface.
Alpha (α)
Significance level. The probability of Type I error (false positive). Typically set at 0.05 (5%) in clinical trials, meaning you accept a 5% chance of concluding there’s an effect when none exists.
Beta (β)
Type II error rate. The probability of missing a real effect (false negative). Typically set at 0.20 (20%), giving 80% power (1 – β = 0.80).
Cohen’s d
Standardized effect size. Calculated as mean difference divided by standard deviation. Values of 0.2, 0.5, and 0.8 represent small, medium, and large effects respectively.
Confidence Interval
Range of plausible values. A 95% CI means if you repeated the study 100 times, 95 of those intervals would contain the true effect. Narrower intervals indicate more precision.
Design Effect (DE)
Clustering adjustment factor. Multiplier applied to sample size for clustered studies. DE = 1 + (cluster size – 1) × ICC. Values typically range from 1.2 to 3.0.
Effect Size
Magnitude of difference. The size of effect you want to detect. Should be the minimum clinically important difference, not just any statistically detectable difference. Examples: 10 mmHg BP reduction, 20% risk reduction.
Hazard Ratio (HR)
Relative risk over time. Used in survival analysis. HR=0.75 means 25% risk reduction. HR=1.0 means no difference. HR>1.0 means increased risk.
ICC (Intraclass Correlation)
Within-cluster similarity. Measures how similar participants within same cluster are compared to different clusters. Ranges from 0 (no clustering) to 1 (perfect clustering). Healthcare studies typically have ICC = 0.01-0.05.
Non-Inferiority Margin
Acceptable difference threshold. In non-inferiority trials, the largest difference by which the new treatment can be worse than standard treatment and still be considered “non-inferior.” Must be clinically justified.
Power (1-β)
Probability of detecting real effect. Typically set at 80% (0.80), meaning an 80% chance of finding statistical significance if the hypothesized effect truly exists. Higher-stakes studies use 90%.
Precision
Half-width of confidence interval. For diagnostic studies, precision of ±3% means estimating sensitivity/specificity within 3 percentage points. Smaller precision requires larger samples.
Sensitivity
True positive rate. Proportion of diseased patients correctly identified by a diagnostic test. Calculated as: true positives / (true positives + false negatives).
Specificity
True negative rate. Proportion of healthy individuals correctly identified as disease-free. Calculated as: true negatives / (true negatives + false positives).
Standard Deviation (SD)
Measure of variability. How much individual observations differ from the mean. Higher SD requires larger samples to detect the same effect size. Estimated from pilot data or literature.
Type I Error
False positive. Concluding there’s an effect when none exists. Controlled by significance level (α). Also called “alpha error.”
Type II Error
False negative. Missing a real effect that exists. Controlled by power (1-β). Also called “beta error.”
Frequently Asked Questions (FAQ)
Common questions about sample size calculation, study design, and using the calculator effectively.
Start by determining: (1) your study design (superiority, non-inferiority, or equivalence), (2) expected effect size from pilot data or literature, (3) estimated variability (standard deviation), (4) desired power (typically 80%), and (5) significance level (typically 0.05). Enter these into our sample size calculator for clinical trials, and it will compute the required sample size with detailed interpretation.
80% power (0.80) is standard for most clinical trials, providing a reasonable balance between sample size feasibility and risk of missing real effects. Use 90% power for pivotal regulatory trials, confirmatory studies, or when consequences of missing an effect are severe. Higher power requires larger samples but reduces the risk of false negatives.
Superiority trials aim to show a new treatment is better than control/standard therapy. Non-inferiority trials aim to show a new treatment is “not worse” than standard by more than a pre-specified margin. Non-inferiority is used when the new treatment has other advantages (lower cost, fewer side effects, easier administration) even if not more effective.
The effect size should represent the minimum clinically important difference – the smallest effect that would change clinical practice or patient decisions. Consult published literature, clinical experts, or patient preferences. Don’t choose the smallest detectable difference; choose the smallest meaningful difference. For example, a 1 mmHg blood pressure reduction is detectable but not clinically meaningful, while 5-10 mmHg is meaningful.
Apply finite population correction when sampling from a limited, well-defined population (e.g., single hospital, small community) and the calculated sample size exceeds 5% of the population. FPC reduces required sample size by accounting for the fact that you’re sampling a substantial fraction of the total population. However, if calculated sample exceeds population size, the study may not be feasible without multi-site collaboration.
Dropout rates vary by study duration and population. Typical rates: short-term trials (<3 months) 10-15%, medium-term (3-12 months) 15-20%, long-term (>1 year) 20-30%. Review similar published studies in your therapeutic area. Consider strategies to minimize dropout: frequent contact, compensation, reducing visit burden, and addressing barriers to participation.
Large sample sizes typically result from: (1) small effect size (harder to detect), (2) high variability (more noise), (3) high power requirements (90-95%), or (4) adjustments for clustering or dropout. Review your assumptions: Is the effect size realistic and clinically meaningful? Is the SD estimate accurate? Can you accept 80% power instead of 90%? For multi-site studies, check if ICC is appropriate. If the sample size is truly infeasible, consider pilot studies, multi-center collaboration, or focusing on larger effect sizes.
This calculator uses peer-reviewed formulas appropriate for research planning and grant applications. However, for formal regulatory submissions (FDA, EMA), we recommend working with an institutional biostatistician who can review assumptions, provide additional validation, and ensure compliance with specific regulatory guidances. The calculator serves as an excellent starting point and educational tool, but regulatory submissions require comprehensive statistical review.
Our calculator provides free, accessible sample size estimation for common study designs using the same fundamental statistical formulas. Commercial software like PASS or G*Power offers more extensive design options, advanced visualizations, and comprehensive validation documentation. This tool serves as an excellent free alternative for standard study designs and educational purposes. For highly specialized designs or regulatory submissions requiring extensive audit trails, commercial software may be preferable.
If the required sample size exceeds recruitment feasibility, consider: (1) multi-center collaboration to expand eligible population, (2) adjusting parameters (e.g., accepting 80% power instead of 90%, or testing a larger effect size), (3) conducting a pilot study to refine estimates and optimize the design, or (4) reconsidering whether the research question can be answered with available resources. Don’t simply reduce sample size arbitrarily, as this undermines study validity and wastes participant time and research resources on an underpowered study.
⚠️ Important Disclaimer
This sample size calculator is provided as a free educational tool for research planning purposes. While the calculator implements peer-reviewed statistical formulas and has been carefully developed, it is intended to assist with preliminary planning and learning, not to replace professional biostatistical consultation.
For formal research submissions: We strongly recommend working with an institutional biostatistician or qualified statistical consultant for:
- Regulatory submissions to FDA, EMA, or other agencies
- Grant applications requiring detailed statistical justification
- IRB/Ethics committee submissions
- Studies with complex designs or specialized requirements
- Final validation of sample size assumptions before study initiation
Limitations: This calculator provides point estimates based on input parameters. Actual sample size requirements may vary based on study-specific considerations, regulatory requirements, institutional policies, feasibility constraints, and updated statistical methods. The calculator does not account for all possible design variations or specialized scenarios.
No warranty: This tool is provided “as is” without warranty of any kind, express or implied. MedPlore and its affiliates assume no liability for any decisions made based on calculator outputs. Users are responsible for verifying all calculations and seeking appropriate professional guidance.
Non-commercial use: This calculator is provided free for academic, educational, and non-commercial research purposes. For commercial use inquiries, please contact us.
Educational purpose: The primary goal of this tool is education and preliminary planning. It helps users understand sample size concepts, learn about statistical power, and explore the impact of different study parameters. Always consult qualified professionals for final study design decisions.
By using this calculator, you acknowledge understanding these limitations and agree to seek professional statistical consultation for critical research applications.