Sample size: diagnostic test (sensitivity & specificity)

sample size
diagnostic
sensitivity
specificity
Sample-size calculator for a diagnostic-accuracy study (Buderer 1996). Computes the number of diseased and non-diseased participants needed to estimate sensitivity and specificity with a target precision.
Published

May 8, 2026

Sample size for a diagnostic-accuracy study

Use this tool when you're evaluating a new test against a reference standard and you need to estimate sensitivity and specificity with a target precision. Based on Buderer (1996).

Probability the new test correctly identifies a diseased person.

How to justify this number

Use a published estimate from a comparable population, or a pilot. If you have only a guess, set sensitivity at 0.80 — this maximises required sample (most conservative).

Probability the new test correctly identifies a non-diseased person.

Half-width of the 95 % confidence interval around Sn and Sp. 0.05 = ± 5 percentage points.

Proportion of patients in your recruitment setting who actually have the disease (by reference standard).

How to justify this number

Determines how many people you must screen to obtain enough diseased / non-diseased participants. If recruitment is by case-control design (you separately enrol cases and controls), prevalence is irrelevant — recruit n_diseased and n_healthy directly.

You need

Adjust the inputs to see your sample size.
What does this calculation actually do?

Buderer (1996) treats sensitivity and specificity as proportions estimated from disjoint subsets (diseased vs non-diseased):

n_diseased = z² · Sn · (1 − Sn) / w²
n_healthy  = z² · Sp · (1 − Sp) / w²
n_total    = max( n_diseased / prev,  n_healthy / (1 − prev) )

The total reflects the number of people you must screen to naturally accrue enough diseased and non-diseased participants. With a case-control design (separate streams), recruit n_diseased cases and n_healthy controls directly — ignore the total.

References: Buderer NMF. Acad Emerg Med 1996;3:895–900. · Hajian-Tilaki K. J Biomed Inform 2014;48:193–204. · Bujang MA, Adnan TH. J Clin Diagn Res 2016;10:YE01–YE06.

../after.html