Sample size calculator for clinical studies: two proportions or two means

Enter the expected outcome in each group, the significance level, the power and the expected loss to follow-up. The calculator gives the number of participants needed in each group, the total to enrol, and a sentence for your methods section. It covers the most common clinical comparison: two independent groups with a binary or a continuous outcome.

e.g. event rate with standard care
the smallest difference worth detecting
1 = equal groups
435group 1
435group 2
870total analysed
968to enrol with 10% loss
For your methods section
Assuming an outcome proportion of 10% in group 1 and 5% in group 2, 435 participants in group 1 and 435 in group 2 (870 in total) give 80% power to detect this difference with a two-sided α of 0.05 (normal approximation, two independent proportions). Allowing for 10% loss to follow-up, we will enrol 968 participants (484 and 484).

Sample size done. Now check the rest of the statistics

CliniPaper reads your analysis plan and results like a statistical reviewer: it recomputes every n/N, percentage and odds ratio in your abstract and tables, and flags the methods problems reviewers raise.

Free to start. No card, no patient data needed.

Which values should I enter?

InputWhere it comes fromTypical value
Control group outcomeYour own data, a registry or published studies in a similar populationStudy-specific
Difference to detectThe smallest difference that would change practice, not the one you hope to seeStudy-specific
Significance level αYour protocol; two-sided0.05
PowerYour protocol or funder80% or 90%
Loss to follow-upPrevious studies with similar follow-up5–20%

What mistakes do reviewers flag in sample size calculations?

  • Assumptions with no source, or a difference chosen to make the study feasible rather than clinically important.
  • A calculation for a different outcome than the primary outcome analysed.
  • Ignoring loss to follow-up, clustering or unequal groups.
  • Calling a non-significant result “no difference” in an underpowered study. See how to read p values and confidence intervals.

The effect measure you report also matters: see odds ratio vs relative risk. Trials report the calculation under CONSORT item 7a; see the CONSORT checklist.

Frequently asked questions

What do I need to calculate a sample size?

The expected outcome in the control group, the smallest difference that would matter clinically, the significance level (usually 0.05, two-sided), the power (usually 80% or 90%), the allocation ratio and the expected loss to follow-up. For a continuous outcome you also need its standard deviation, from a pilot study or published data.

Should I use 80% or 90% power?

Both are accepted. 80% is the most common minimum; 90% is often expected for confirmatory trials and makes a missed true effect half as likely, at the cost of a larger study (about a third more participants).

Which formula does the calculator use?

For two proportions, the normal approximation with pooled variance under the null hypothesis, without continuity correction. For two means, the normal approximation with a common standard deviation. Both are two-sided. Results match standard tables and programs for these designs; a continuity correction or a t-distribution adds a few participants.

How do I account for dropout?

Divide the number needed for analysis by one minus the expected loss. With 100 needed and 10% loss you enrol 100 / 0.9 = 112. The calculator does this per group and rounds up.

Does this work for a cohort or case-control study?

For a cohort comparing the proportion with the outcome in exposed and unexposed groups, yes: enter each group as a proportion and the exposed-to-unexposed ratio. Case-control, survival (time-to-event), cluster, non-inferiority and paired designs need other formulas.

How do I report the sample size calculation?

State every assumption and where it came from: the expected outcome in each group or the difference and standard deviation, α, power, allocation ratio, allowance for loss to follow-up and the resulting numbers. CONSORT item 7a asks trials for exactly this. The calculator writes a sentence you can adapt.

For planning and teaching. Confirm the final calculation with a statistician for designs this calculator does not cover. For a full statistics check of your manuscript, see AI manuscript review.