2×2 Diagnostic Test Calculator: Sensitivity, Specificity, PPV & NPV

Enter the four cell counts from a 2×2 contingency table to calculate diagnostic test sensitivity, specificity, positive/negative predictive values, prevalence, and likelihood ratios for USMLE, MCAT, and Biostatistics problems.

Test Result \ Gold Standard Disease Present (+) Disease Absent (−) Row Total
Test Positive (+) True Positive (TP) False Positive (FP) 110
Test Negative (−) False Negative (FN) True Negative (TN) 890
Column Total 100 900 1000
Sensitivity (TPR)
90.0%
TP / (TP + FN)
Specificity (TNR)
97.8%
TN / (TN + FP)
Positive Predictive Value (PPV)
81.8%
TP / (TP + FP)
Negative Predictive Value (NPV)
98.9%
TN / (TN + FN)
Sample Prevalence
10.0%
(TP + FN) / Total
Overall Accuracy
97.0%
(TP + TN) / Total
Positive Likelihood Ratio (LR+)
40.50
Sens / (1 − Spec)
Negative Likelihood Ratio (LR−)
0.10
(1 − Sens) / Spec
Exam-Ready Clinical Interpretation:
Educator's Exam Trap Warning (Prevalence vs. Intrinsic Accuracy): Click the two preset buttons above to compare a 10% prevalence group with a 2% prevalence group using the exact same test (90% sensitivity, 97.8% specificity). Notice that Sensitivity and Specificity stay identical because they are intrinsic properties of the test, whereas PPV drops from 81.8% to 47.4% when the disease is rare. This is one of the highest-yield concepts on USMLE Step 1/Step 2 CK and MCAT passages.

How Diagnostic Test Formulas Work

In biostatistics and clinical epidemiology, a diagnostic screening test is evaluated against a definitive "gold standard" diagnosis using four outcomes:

Metric Formula Clinical & Exam Mnemonic
Sensitivity TP / (TP + FN) SNOUT: High Sensitivity rules OUT disease when negative (low false negatives).
Specificity TN / (TN + FP) SPIN: High Specificity rules IN disease when positive (low false positives).
PPV TP / (TP + FP) Probability that a patient with a positive test truly has the disease (increases with prevalence).
NPV TN / (TN + FN) Probability that a patient with a negative test truly does not have the disease (decreases with prevalence).

Frequently Asked Questions

1. Why does PPV drop when screening a low-prevalence population?

Even a highly specific test (e.g., 98% specificity, meaning a 2% false-positive rate) generates a noticeable number of false positives when applied to thousands of healthy people. When true cases are rare, those false positives make up a larger share of all positive results, lowering Positive Predictive Value.

2. Do Sensitivity and Specificity change if disease prevalence changes?

No. Sensitivity is calculated strictly down the "Disease Present" column, and Specificity is calculated strictly down the "Disease Absent" column. Because neither formula mixes sick and healthy columns, changing prevalence does not alter sensitivity or specificity.

3. What makes a good Positive Likelihood Ratio (LR+)?

An LR+ greater than 10 strongly increases the post-test probability of disease when a test comes back positive, while an LR− less than 0.1 strongly decreases the post-test probability when a test comes back negative.