Clinical Trial Size Calculator

The Clinical Trial Size Calculator estimates required sample sizes for clinical trials using effect size, power, significance level, allocation ratio, and dropout.

Clinical Trial Size Calculator Estimate the required sample size for a two-arm parallel clinical trial comparing proportions (e.g., response rates) using a normal approximation. This tool is for educational purposes only and does not replace professional statistical or medical advice.
Typical values are 0.05 or 0.01.
Commonly 0.80, 0.90, or 0.95.
Expected response rate in control arm (0–1).
Target response rate in treatment arm (0–1).
1 for equal allocation; >1 for more in treatment arm.
Percentage increase to compensate for attrition.
Example Presets

Report an issue

Spotted a wrong result, broken field, or typo? Tell us below and we’ll fix it fast.


About the Clinical Trial Size Calculator

This tool estimates how many participants or events a clinical trial needs to meet a target power. It supports common designs such as two-arm parallel trials for continuous outcomes, binary outcomes, and time-to-event endpoints. It also accounts for allocation ratios, expected dropout, and cluster randomization.

Sample size planning is part science and part judgment. You supply estimates for baseline risk, variability, and the smallest effect worth detecting. The calculator combines these inputs with your chosen type I error and power to produce a sample size. It also shows how sensitive the result is to your assumptions.

Use it early in protocol development to scope feasibility and budget. Use it again when finalizing the protocol to document statistical assumptions and decision criteria. Clear documentation improves transparency for ethics committees, sponsors, and regulators.

Clinical Trial Size Calculator
Model clinical trial size and see the math.

How to Use Clinical Trial Size (Step by Step)

Start by choosing your endpoint type and study design. Gather reasonable estimates for the control group and the effect size you want to detect. Decide on the statistical power and significance level that match your decision needs.

  • Select the endpoint type: continuous (mean), binary (proportion), or time-to-event (hazard ratio).
  • Enter control values: standard deviation for means, control event rate for binary, or expected event rate/median survival for time-to-event.
  • Specify the target effect: mean difference, absolute risk difference, relative risk, odds ratio, or hazard ratio.
  • Set power (commonly 80% or 90%) and alpha (often two-sided 0.05).
  • Adjust for allocation ratio, expected dropout, and any cluster design.

Review the result and the calculator’s sensitivity notes. If uncertainty is high, run scenarios with conservative and optimistic values. This helps you balance precision, ethics, and resources.

Equations Used by the Clinical Trial Size Calculator

Under standard assumptions, the calculator relies on well-known formulas for two-sample comparisons. These formulas use the normal approximation for planning, which is common practice in statistics for prospective design. They generalize to unequal allocation and clustered designs with inflation factors.

  • Difference in means (two independent groups): n per group = 2 × (Z(1−α/2) + Z(power))² × σ² / Δ², where σ is the common standard deviation and Δ is the mean difference to detect.
  • Difference in proportions (two independent groups, equal allocation): n per group ≈ [Z(1−α/2) × √(2 p̄ (1−p̄)) + Z(power) × √(p1(1−p1) + p2(1−p2))]² / (p1 − p2)², where p̄ = (p1 + p2)/2.
  • Time-to-event endpoint (log-rank test): required number of events D = (Z(1−α/2) + Z(power))² / [ln(HR)]². Total sample size n depends on the expected event fraction during follow-up: n ≈ D / event_fraction.
  • Unequal allocation (ratio r = n2/n1): inflate total n by factor (1 + r)² / (4r) compared with equal allocation.
  • Cluster randomized trials: design effect DE = 1 + (m−1) × ICC. If cluster sizes vary, use DE × (1 + CV²), where m is average cluster size, ICC is intracluster correlation, and CV is the coefficient of variation of cluster size.

For non-inferiority or equivalence, replace Δ with the margin and use one-sided α as appropriate. The calculator applies continuity or small-sample adjustments when necessary and reports any notable impact on the result.

Inputs, Assumptions & Parameters

Accurate sample size relies on a few key inputs. These reflect your scientific goals and your best estimates from prior data or literature. Being explicit about assumptions makes the result easier to justify.

  • Significance level (α): Commonly 0.05 two-sided or 0.025 one-sided, aligned with your hypothesis and claims.
  • Power (1−β): Often 80% or 90%, higher for pivotal decisions or safety-sensitive endpoints.
  • Effect size: Mean difference, absolute risk difference, relative risk/odds ratio, or hazard ratio worth detecting.
  • Variability or baseline risk: Standard deviation for continuous outcomes or control event rate for binary outcomes.
  • Allocation ratio: Typically 1:1, but 2:1 or other ratios may suit recruitment or ethics.
  • Adjustments: Anticipated dropout/noncompliance, cluster design effects, or stratification impacts.

Ranges and edge cases matter. Extreme effect sizes can yield unrealistically small n. Very low event rates may require high n to gather enough events. If your inputs are uncertain, test low and high scenarios to see how sensitive the result is, and consider conservative planning.

Using the Clinical Trial Size Calculator: A Walkthrough

Here’s a concise overview before we dive into the key points:

  1. Choose the endpoint type that matches your primary outcome.
  2. Enter control values such as standard deviation or control event rate.
  3. Specify the effect size that is clinically meaningful and realistic.
  4. Set alpha and power according to your decision thresholds.
  5. Define allocation ratio and expected dropout or nonadherence.
  6. If clustered, enter average cluster size and ICC to apply design effect.

These points provide quick orientation—use them alongside the full explanations in this page.

Case Studies

A two-arm pain trial compares a new drug to placebo on a 0–10 numeric scale at 8 weeks. Prior studies suggest a standard deviation of 2.0. The team targets a mean difference of 0.8, two-sided α = 0.05, and 90% power. Using the means formula, the calculator returns about 66 per group, which becomes 74 per group after a 10% dropout adjustment. What this means: Plan to randomize roughly 148 participants to achieve the desired power under these assumptions.

An oncology study tests a new therapy versus control with a time-to-event endpoint. The expected hazard ratio is 0.75, with two-sided α = 0.05 and 80% power. The calculator estimates 95 events are needed. If the event fraction over the accrual and follow-up window is 0.60, total n ≈ 95 / 0.60 ≈ 159, rounded up to 164 for operational buffer. What this means: Enroll about 160–170 participants to gather the needed number of events within the planned timeline.

Assumptions, Caveats & Edge Cases

Every sample size relies on assumptions. Variability, event rates, and adherence often differ between pilot data and a full trial. A small change in inputs can shift the result substantially, especially when outcomes are rare or variability is large.

  • Event rate misspecification: Overestimating events can yield an underpowered study; model accrual and censoring realistically.
  • Non-normal outcomes: For continuous endpoints with skew, consider transformations or robust methods at the analysis stage.
  • Dropout and nonadherence: Inflate n to preserve power if losses are expected, and consider estimands aligned with real-world use.
  • Multiplicity: If you test multiple endpoints or interim looks, adjust α or use group-sequential designs.
  • Cluster or site effects: Even in individual randomization, site-level correlation can inflate variance; monitor and model it.

Document your rationale for each assumption and cite sources. When in doubt, plan sensitivity analyses. A transparent record helps reviewers understand the design and strengthens your protocol.

Units & Conversions

Units matter because the equations depend on consistent scales. A small mismatch, such as entering percent instead of proportion, can double or halve the result. Keep time, rates, and variability in compatible units before calculating.

Common unit conversions for trial planning
Quantity Convert from Convert to How to convert
Proportions Percent (%) Proportion (0–1) Divide by 100 (e.g., 25% → 0.25)
Time Months Years Divide by 12 (e.g., 18 months → 1.5 years)
Event rates Per 1,000 person-years Per person-year Divide by 1,000 (e.g., 40/1,000 PY → 0.04/PY)
Effect on hazard Hazard ratio log(HR) Take natural log (e.g., HR 0.75 → ln 0.75 ≈ −0.288)
Variability SD in one unit SD in another unit Apply the same scale change (e.g., mmHg to kPa)

Read the table left to right. Confirm you convert the effect size and the variability into the same unit. For time-to-event designs, compute log(HR) once, then use it consistently across scenarios.

Tips If Results Look Off

If the output seems too small or too large, it often traces back to a unit or assumption mismatch. Check the outcome scale, the control rate, and whether α is one-sided or two-sided. Confirm the dropout and allocation settings are what you intended.

  • Verify percentage vs proportion and all time units.
  • Review the effect size direction and clinical relevance.
  • Re-check standard deviation or event rate sources.
  • Run a low/high sensitivity range to bound uncertainty.

Still unsure? Compare with a published trial of a similar design. A large discrepancy usually signals an input or assumption error, not a special feature of your study.

FAQ about Clinical Trial Size Calculator

Should I choose 80% or 90% power?

Use 90% when missing a true effect would be costly or unsafe. Use 80% when feasibility is tight, the effect is large, or the trial is exploratory.

When do I use a one-sided alpha?

Use a one-sided α only if effects in the opposite direction are not clinically relevant or cannot support your claim. Otherwise, use two-sided α.

How do I plan for dropout?

Divide the required completers by (1 − dropout rate). For example, if you need 100 completers and expect 15% dropout, enroll 100 / 0.85 ≈ 118.

Can I reuse pilot data to set inputs?

Yes, but treat small pilots with caution. Consider wider ranges for variability or event rates, and run sensitivity scenarios to protect power.

Key Terms in Clinical Trial Size

Power

The probability the study detects the specified effect size when it is truly present, commonly set at 80% or 90%.

Significance level (alpha)

The allowed probability of a false positive. Two-sided 0.05 is common for superiority trials.

Effect size

The smallest clinically meaningful difference to detect, such as a mean difference, risk difference, or hazard ratio.

Standard deviation

A measure of outcome variability for continuous endpoints. Larger values require larger samples to detect the same difference.

Event fraction

The expected proportion of participants who will have the event during the study period, used to convert events to total sample size.

Allocation ratio

The ratio of participants assigned to each arm, such as 1:1 or 2:1, which influences total sample size and precision.

Intracluster correlation (ICC)

A measure of similarity within clusters. Even small ICC values can inflate sample size when clusters are large.

Non-inferiority margin

The largest loss of efficacy acceptable to still claim the new treatment is not unacceptably worse than control.

Sources & Further Reading

Here’s a concise overview before we dive into the key points:

These points provide quick orientation—use them alongside the full explanations in this page.

Save this calculator
Found this useful? Pin it on Pinterest so you can easily find it again or share it with your audience.

Leave a Comment