Diagnostic Accuracy · ACC-2P
Sample Size for Comparing Two Paired Sensitivities or Specificities
Plan sample size for comparing the sensitivity or specificity of two diagnostic tests performed in the same participants.
4. Results
Enter the paired sensitivity/specificity comparison assumptions and select Calculate.
Suggested sample-size wording
Warnings
Formula, assumptions, limitations, and methodological note
Example clinical scenario
Every patient with suspected influenza receives both a rapid antigen test and a molecular test, allowing paired sensitivities or specificities to be compared.
Formula and methodological note
Design selection: Use this calculator only when both diagnostic tests are performed in the same participants. For separate participant samples, use the independent sensitivity/specificity calculator.
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 compares paired diagnostic-test accuracy using a McNemar-type paired-proportion approach. It tests H0: P_A = P_B against H1: P_B = P_A + Delta, where P is either sensitivity or specificity.
P_B = P_A + Delta
b = (Psi - Delta) / 2
c = (Psi + Delta) / 2
a = P_A - b
d = 1 - P_A - c
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(Psi) + Z power x sqrt(Psi - Delta^2)]^2 / Delta^2
Balanced 1:1: nRelevant = ceiling(nRaw) in the selected reference-standard group; include the same number in the opposite reference-standard group.
Consecutive/cross-sectional sensitivity: N = ceiling(nRaw / prevalence)
Consecutive/cross-sectional specificity: N = ceiling(nRaw / (1 - prevalence))
Inflation is applied to the raw unrounded sample size: ceiling(raw / (1 - loss fraction)).
Methodological note: This calculator is intended for superiority testing of paired sensitivities or paired specificities when both binary diagnostic tests are applied to the same participants and evaluated against a binary reference standard. It does not jointly power sensitivity and specificity, and does not cover independent samples, non-inferiority, equivalence, clustered data, repeated lesions, or multiple-reader studies.
Note: To compare both sensitivity and specificity, run the calculator separately for each endpoint and ensure the final recruitment plan provides adequate reference-standard-positive and reference-standard-negative participants.
Technical results
Method references
- Connor RJ. Sample size for testing differences in proportions for the paired-sample design. Biometrics. 1987;43:207-211. Lachin JM. Power and sample size evaluation for the McNemar test. Statistics in Medicine. 1992;11:1239-1251.
Suggested citation
Yaacob, Najib Majdi. “Sample Size for Comparing Two Paired Sensitivities or Specificities (ACC-2P).” Web calculator. NajibMY, 2026. Accessed July 29, 2026. https://najibmy.netlify.app/tools/sample-size/diagnostic-accuracy/two-paired-accuracy/.