Diagnostic Accuracy Sample Size Calculator

This diagnostic accuracy sample size calculation can help you determine the minimum number of participants needed for a statistically valid evaluation of a diagnostic test's sensitivity and specificity, considering disease prevalence and desired confidence interval. It ensures the study will be appropriately powered while optimizing resources and maintaining accuracy. By factoring in sensitivity, specificity, and disease prevalence, this tool enables you to approximate a required sample size for reliable results with your desired precision taking into account predicted patient dropouts.

Estimated Sensitivity
Estimated Specificity
Estimated Prevalence of Disease
Margin of Error (typically 0.10)
Expected Dropout Percentage (%)
Confidence Interval (typically 95%)

Calculations derived from Fenn Buderer, N. M. (1996). Statistical Methodology: I. Incorporating the Prevalence of Disease into the Sample Size Calculation for Sensitivity and Specificity. Academic Emergency Medicine, 3(9), 895-900.

Sample Size for Sensitivity (SN)

\( a_c = \frac{z^2 \cdot \text{SN} \cdot (1 - \text{SN})}{w^2} \)
\( n_1 = \left\lceil \frac{a_c}{p} \right\rceil \)

Sample Size for Specificity (SP)

\( b_d = \frac{z^2 \cdot \text{SP} \cdot (1 - \text{SP})}{w^2} \)
\( n_2 = \left\lceil \frac{b_d}{1 - p} \right\rceil \)

Total Sample Size (Including Dropouts)

\( \text{Adjusted Sample Size} = \left\lceil \frac{\max(n_1, n_2)}{1 - \frac{\text{dp}}{100}} \right\rceil \)

Understanding Input Variables

  • \( z \): The z-score corresponding to the desired confidence level (e.g., 1.96 for 95% confidence).
  • SN: Sensitivity (true positive rate), the proportion of actual positives correctly identified.
  • SP: Specificity (true negative rate), the proportion of actual negatives correctly identified.
  • \( w \): The margin of error (e.g., 0.05 for ±5%).
  • \( p \): The prevalence of the condition in the population.
  • \( a_c \): Intermediate calculation representing the variance of sensitivity adjusted for the margin of error.
  • \( b_d \): Intermediate calculation representing the variance of specificity adjusted for the margin of error.
  • \( n_1 \): The sample size required for sensitivity, rounded up to the nearest integer using the ceiling function (\( \lceil \cdot \rceil \)).
  • \( n_2 \): The sample size required for specificity, rounded up to the nearest integer using the ceiling function (\( \lceil \cdot \rceil \)).
  • \( dp \): The dropout percentage, representing the estimated proportion of participants expected to leave or be lost to follow-up.

Why is Sample Size for Diagnostic Accuracy Important?

Determining an appropriate sample size is a critical step in research design, as it directly impacts the study's validity and reproducibility. A sample size that is too small can lead to misleading conclusions due to wide confidence intervals and low statistical power, increasing the risk of Type I and Type II errors. Conversely, an unnecessarily large sample size may lead to wasted resources and participant burden. This calculator can help you strike a balance between achieving precise estimates and maintaining efficiency.

Simplify Your Entire Manuscript Workflow with Livewrite

Livewrite works directly inside Microsoft Word to support every stage of manuscript preparation—from first draft to final submission.

Why Livewrite

  • Write and edit in Word with structured, journal-aware assistance that improves clarity, flow, and scientific rigor.
  • Cite as you write by searching 240+ million publications that match any sentence or paragraph, previewing the most relevant citations, and inserting them instantly—fully compatible with Zotero and Mendeley.
  • Instantly format your manuscript for any journal, including title pages, abstracts, headings, tables, figures, and references. (premium subscription)
  • Automated peer review before submission to flag missing requirements, reporting guideline gaps, and common reviewer concerns—helping prevent avoidable delays and desk rejections.

Draft, edit, cite, review, and format—without leaving Word.