Skip to content
Medical writing and publication support Research consultingInsightssupport@editverse.org
EditverseMedical
Menu
Medical dissertations

Sample size for a medical thesis: four worked calculations

Two proportions, two means, a prevalence estimate and a diagnostic accuracy study, each worked step by step with the sentence to write in the methods section.

Editverse Medical editorial deskPublished Guideline versions checked November 2026

Key points

  • Choose the formula from the primary objective: comparing two proportions, comparing two means, estimating a proportion, or estimating sensitivity and specificity.
  • Every calculation needs inputs with a source: the expected value from earlier work, the difference or precision you care about, the confidence level and, for comparisons, the power.
  • The four illustrative examples below give 174 per group, 77 per group, 323 participants and 203 participants before any allowance for loss.
  • Round up, then inflate for expected loss by dividing by the proportion you expect to retain.
  • The methods sentence must let an examiner repeat the calculation: formula or software, each input, and the result.

Before you calculate

A sample size is tied to one objective, the primary one. Ethics committees expect it to be justified: the ICMR National Ethical Guidelines 2017 list "sample size (with justification)" among the contents of a protocol.8 Reporting guidelines ask for the same in the final write-up. STROBE item 10 asks observational studies to explain how the study size was arrived at, and CONSORT 2025 asks trials to report how the sample size was determined.6,7

The formulas are sensitive to their inputs. Small changes in an assumed standard deviation or difference can change the answer a great deal, so each input needs a stated source.1

Which calculation fits which primary objective
Primary objectiveCalculationInputs you must supply
Compare a yes or no outcome between two groupsTwo independent proportionsExpected proportion in each group, significance level, power
Compare a continuous outcome between two groupsTwo independent meansStandard deviation, smallest difference worth detecting, significance level, power
Estimate how common something isSingle proportion with a stated precisionExpected proportion, absolute precision, confidence level
Estimate sensitivity and specificity of a testSingle proportion for each, scaled by prevalenceExpected sensitivity and specificity, precision, prevalence in the study setting, confidence level

The standard normal values used throughout are 1.96 for a two-sided 5% significance level or 95% confidence, 0.84 for 80% power and 1.28 for 90% power. With 5% significance and 80% power, (1.96 + 0.84)2 = 7.84.

About the examples

All four studies are invented and the input values are illustrative. Do not copy them. Take your own inputs from published studies or pilot data in a comparable population and cite them. Every calculation in this post was checked by computation before publication.

1. Two proportions

Scenario. A surgical thesis compares surgical site infection within 30 days between a standard dressing and a new dressing. Earlier departmental data suggest 18% with the standard dressing. The candidate and guide judge that a fall to 8% would change practice.

Formula. n per group = (Zα/2 + Zβ)2 × [p1(1 − p1) + p2(1 − p2)] ÷ (p1 − p2)2

Inputs
p1 = 0.18, p2 = 0.08, two-sided α = 0.05, power = 80%
Step 1
Variance terms: 0.18 × 0.82 = 0.1476 and 0.08 × 0.92 = 0.0736. Sum = 0.2212
Step 2
Difference squared: (0.18 − 0.08)2 = 0.01
Step 3
7.84 × 0.2212 ÷ 0.01 = 173.4, rounded up to 174 per group
Allowance for loss
Expecting 10% loss to follow-up: 174 ÷ 0.90 = 193.3, rounded up to 194 per group, 388 in total

Methods sentence. "Assuming a 30-day surgical site infection rate of 18% with the standard dressing [reference] and 8% with the new dressing, 174 participants per group were required to detect this difference with 80% power at a two-sided 5% significance level, using the formula for two independent proportions. Allowing for 10% loss to follow-up, 194 participants per group (388 in total) were recruited."

Software may give a slightly different number because several versions of this formula exist. With the same inputs, the version that uses a pooled proportion under the null hypothesis gives 177 per group, and adding a continuity correction gives 196. None is wrong. State which formula or which program and version you used.

2. Two means

Scenario. A medicine thesis compares the fall in HbA1c at 12 weeks between two treatment schedules. A previous study reports a standard deviation of 1.1 percentage points for the change. A difference of 0.5 percentage points is taken as the smallest clinically important difference.

Formula. n per group = 2 × (Zα/2 + Zβ)2 × σ2 ÷ δ2

Inputs
σ = 1.1, δ = 0.5, two-sided α = 0.05, power = 80%
Step 1
σ2 = 1.21 and δ2 = 0.25
Step 2
2 × 7.84 × 1.21 ÷ 0.25 = 75.9, rounded up to 76 per group
Small-sample adjustment
The formula uses the normal distribution. Programs that use the t distribution, which is what the analysis will use, return 77 per group for these inputs. Use 77.
Allowance for loss
77 ÷ 0.90 = 85.6, rounded up to 86 per group, 172 in total

Methods sentence. "The sample size was based on the change in HbA1c at 12 weeks. With a standard deviation of 1.1 percentage points [reference], 77 participants per group give 80% power to detect a difference of 0.5 percentage points between groups at a two-sided 5% significance level (two-sample t test). To allow for 10% attrition, 86 participants per group were enrolled."

The standard deviation drives this calculation because it is squared. If the true standard deviation were 1.3 instead of 1.1, the same formula gives 2 × 7.84 × 1.69 ÷ 0.25 = 106 per group. Report where the value came from, and prefer a study in a similar population to a convenient one.

3. A prevalence estimate

Scenario. A community medicine thesis estimates the prevalence of vitamin D deficiency among adults attending an outpatient clinic. A regional study reports 30%. The candidate wants the 95% confidence interval to extend no more than 5 percentage points either side of the estimate.

Formula. n = Z2 × p(1 − p) ÷ d2

Inputs
p = 0.30, absolute precision d = 0.05, 95% confidence (Z = 1.96)
Step 1
Z2 = 3.8416 and p(1 − p) = 0.30 × 0.70 = 0.21
Step 2
3.8416 × 0.21 ÷ 0.0025 = 322.7, rounded up to 323
Allowance for non-response
Expecting 10% refusals or unusable samples: 323 ÷ 0.90 = 358.9, rounded up to 359 approached
Small source population
If only 1,200 eligible adults attend during the study period, the finite population correction n ÷ [1 + (n − 1) ÷ N] gives 323 ÷ (1 + 322 ÷ 1,200) = 254.7, rounded up to 255

Methods sentence. "Assuming a prevalence of vitamin D deficiency of 30% [reference], a sample of 323 participants was required to estimate the prevalence with an absolute precision of 5 percentage points at the 95% confidence level. Allowing for 10% non-response, 359 adults were invited."

Two points cause most confusion here. First, say whether precision is absolute or relative. Five percentage points either side of 30% is absolute precision. "5% of 30%" would be 1.5 percentage points and would need a far larger sample. Second, if you have no prior estimate, 50% gives the largest sample for a given precision: 385 for the inputs above.

4. Diagnostic accuracy

Scenario. A radiology thesis estimates the sensitivity and specificity of a point-of-care ultrasound sign against CT as the reference standard. Published work suggests sensitivity of 90% and specificity of 85%. The condition is present in about 35% of patients referred for imaging in the department. The candidate wants each 95% confidence interval to be within 7 percentage points of the estimate.

Formula. This approach, described in Academic Emergency Medicine in 1996, builds prevalence into the calculation.3 First find how many participants with the disease are needed for sensitivity and how many without for specificity, using the single-proportion formula. Then divide by the prevalence, or by one minus the prevalence, to get the total to recruit. Take the larger total.

Inputs
Sensitivity = 0.90, specificity = 0.85, precision d = 0.07, prevalence = 0.35, 95% confidence
Sensitivity
3.8416 × 0.90 × 0.10 ÷ 0.0049 = 70.6, so 71 participants with the disease. Total = 71 ÷ 0.35 = 202.9, rounded up to 203
Specificity
3.8416 × 0.85 × 0.15 ÷ 0.0049 = 99.96, so 100 participants without the disease. Total = 100 ÷ 0.65 = 153.8, rounded up to 154
Result
The larger figure governs: 203 participants, expected to include about 71 with and 132 without the disease

Methods sentence. "The sample size was calculated to estimate sensitivity and specificity with a precision of 7 percentage points at the 95% confidence level. Assuming sensitivity of 90% and specificity of 85% [reference] and a disease prevalence of 35% among referred patients [departmental data, year], 71 participants with and 100 without the target condition were needed, giving a total of 203 consecutive participants [reference for the method]."

Prevalence matters as much as accuracy. If the condition were present in only 15% of referred patients, the sensitivity requirement alone would need 71 ÷ 0.15 = 474 participants. Other methods exist for comparing two tests or for studies based on the area under the ROC curve.4

Summary of the four examples

Illustrative inputs and results (invented scenarios)
ExampleKey inputsCalculatedAfter 10% allowance
Two proportions18% vs 8%, power 80%174 per group194 per group
Two meansSD 1.1, difference 0.5, power 80%77 per group86 per group
Prevalence30%, precision 5 points323359
Diagnostic accuracySensitivity 90%, specificity 85%, prevalence 35%, precision 7 points203Not applied

Checks an examiner will make

  • The calculation concerns the primary outcome named in the objectives, not a secondary one.
  • Each input has a reference or a stated source such as pilot data, with the population it came from.
  • The difference to detect is justified clinically, not chosen to make the number fit the available patients.
  • The test in the calculation matches the test in the analysis plan.
  • Rounding is upward, and the allowance for loss divides by the retained proportion (n ÷ 0.90), which is slightly larger than adding 10%.
  • The number recruited and the number analysed are both reported in the results.
  • If the department cannot supply the calculated number in the study period, the thesis says so and reports the precision or power the achievable sample provides, instead of adjusting inputs after the fact.

These formulas cover simple designs with independent groups. Matched or paired designs, more than two groups, clustered data, time-to-event outcomes and regression or prediction models need other methods, and software or a statistician should be used.2,5 For reporting numbers and statistics in the thesis itself, the SAMPL guidelines are a concise reference.9

Editverse Medical statisticians prepare documented sample size justifications under sample size, power and study design: you supply the objectives, the design and the source studies, and receive the calculation, its assumptions and the methods wording. Analysis of the collected data and the written results chapter are covered by thesis statistics and results chapter. Both sit within our statistical interpretation work, and follow the candidate's university rules.

Frequently asked questions

Should I use 80% or 90% power?

Either is acceptable if stated in advance. Moving from 80% to 90% changes the multiplier (Zα/2 + Zβ)2 from 7.84 to 10.5, which raises the sample by about a third. In the first example it takes the requirement from 174 to 233 per group.

My university says a thesis needs at least 30 cases. Is that a sample size calculation?

No. A minimum set by a department is an administrative floor. The thesis still needs a calculation or a reasoned justification tied to the primary objective. If the available number is fixed, report the precision or power it gives.

Which software can I cite?

Any program that documents its methods can be cited, with its version. What matters is that the method, the inputs and the result are stated so the calculation can be repeated.

What if no earlier study gives the inputs I need?

Use the closest population available and say so, or run a small pilot and report its estimates as the source. For a prevalence study with no prior estimate, 50% gives the most conservative sample for a chosen precision.

References

  1. Noordzij M, Tripepi G, Dekker FW, Zoccali C, Tanck MW, Jager KJ. Sample size calculations: basic principles and common pitfalls. Nephrol Dial Transplant. 2010;25(5):1388-93. PMID 20067907 · DOI
  2. Wang X, Ji X. Sample Size Estimation in Clinical Research: From Randomized Controlled Trials to Observational Studies. Chest. 2020;158(1S):S12-S20. PMID 32658647 · DOI
  3. Buderer NM. Statistical methodology: I. Incorporating the prevalence of disease into the sample size calculation for sensitivity and specificity. Acad Emerg Med. 1996;3(9):895-900. PMID 8870764 · DOI
  4. Hajian-Tilaki K. Sample size estimation in diagnostic test studies of biomedical informatics. J Biomed Inform. 2014;48:193-204. PMID 24582925 · DOI
  5. Riley RD, Ensor J, Snell KIE, Harrell FE Jr, Martin GP, Reitsma JB, et al. Calculating the sample size required for developing a clinical prediction model. BMJ. 2020;368:m441. PMID 32188600 · DOI
  6. Vandenbroucke JP, von Elm E, Altman DG, Gøtzsche PC, Mulrow CD, Pocock SJ, et al. Strengthening the Reporting of Observational Studies in Epidemiology (STROBE): explanation and elaboration. PLoS Med. 2007;4(10):e297. PMID 17941715 · DOI
  7. Hopewell S, Chan AW, Collins GS, Hróbjartsson A, Moher D, Schulz KF, et al. CONSORT 2025 statement: updated guideline for reporting randomised trials. BMJ. 2025;389:e081123. PMID 40228833 · DOI
  8. Indian Council of Medical Research. National Ethical Guidelines for Biomedical and Health Research Involving Human Participants. New Delhi: ICMR; 2017. Official PDF
  9. Lang TA, Altman DG. Basic statistical reporting for articles published in biomedical journals: the "Statistical Analyses and Methods in the Published Literature" or the SAMPL Guidelines. Int J Nurs Stud. 2015;52(1):5-9. PMID 25441757 · DOI

Send the manuscript, data or brief.

A subject-matter expert reads it and replies by email with scope, timeline and a fixed price.