Diagnostic Accuracy · ACC-2I

Sample Size for Comparing Two Independent Sensitivities or Specificities

Plan sample size for comparing the sensitivity or specificity of two diagnostic tests evaluated in separate, independent participant samples.

1. Planning setup

Endpoint to compare

Planned sampling approach

2. Information obtained from previous study/literature

Expected accuracy for the comparator test arm based on pilot data, previous studies, or a clinically comparable population.

3. Information decided by the researcher

The smallest improvement for Test B above Test A that the study should be powered to detect.

Anticipated sensitivity of Test B: 80%

The significance level is calculated as alpha = 1 - confidence level.

Allow for incomplete index-test or reference-standard data in each independent test arm.

4. Results

Enter the independent sensitivity/specificity comparison assumptions and select Calculate.

Formula, assumptions, limitations, and methodological note

Example clinical scenario

A researcher compares sensitivity of a new sepsis screening protocol in one hospital with standard screening in an independent hospital cohort.

Formula and methodological note

Design selection: Use this calculator only when Test A and Test B are evaluated in separate participant samples. Do not use it when both tests are performed in the same participants; use the paired sensitivity/specificity calculator instead.

Scope and limitations: Use this calculator only for the diagnostic design named on this page and its stated independent or paired sampling assumptions. It does not cover clustering, repeated lesions, multiple-reader designs, prediction-model development, or non-inferiority/equivalence unless explicitly stated. The implemented normal or binormal approximation may be unsuitable near parameter boundaries or with sparse reference-standard groups. Where prevalence is used, it supports recruitment planning and does not necessarily form part of the core precision or hypothesis-test calculation.

This calculator tests H0: P_A = P_B against H1: P_B = P_A + Delta for two independent diagnostic-test samples, where P is either sensitivity or specificity.

H0: P_A = P_B

H1: P_B = P_A + Delta

Pbar = (P_A + P_B) / 2

Z alpha = Phi^-1(1 - alpha / 2) for a two-sided test, or Phi^-1(1 - alpha) for one-sided superiority.

Z power = Phi^-1(power)

nRaw = [Z alpha x sqrt(2 x Pbar x (1 - Pbar)) + Z power x sqrt(P_A x (1 - P_A) + P_B x (1 - P_B))]^2 / Delta^2

Balanced 1:1: n = ceiling(nRaw) in the selected reference-standard group per test arm; the same number is included in the opposite reference-standard group.

Consecutive/cross-sectional sensitivity: N per arm = ceiling(nRaw / prevalence)

Consecutive/cross-sectional specificity: N per arm = ceiling(nRaw / (1 - prevalence))

Methodological note: This calculator is intended for superiority testing of sensitivity or specificity between two diagnostic tests evaluated in independent participant samples, with a binary reference standard. It does not cover paired tests, comparison of both endpoints jointly, non-inferiority or equivalence designs, clustering, repeated lesions, or multiple-reader studies.

Method references

  1. Hajian-Tilaki K. Sample size estimation in diagnostic test studies of biomedical informatics. Journal of Biomedical Informatics. 2014;48:193-204. Eq. 6.9.

Suggested citation

Yaacob, Najib Majdi. “Sample Size for Comparing Two Independent Sensitivities or Specificities (ACC-2I).” Web calculator. NajibMY, 2026. Accessed July 29, 2026. https://najibmy.netlify.app/tools/sample-size/diagnostic-accuracy/two-independent-accuracy/.