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 |
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.