Interactive Biostatistics Calculator
2×2 Diagnostic & Risk Matrix
USMLE Step 3 Day 1 (FIP) emphasizes understanding how test characteristics and disease prevalence influence clinical decision making.
Use the live calculator below to experiment with changing counts and observe how Prevalence affects PPV and NPV while Sensitivity and Specificity remain independent of prevalence.
Interactive 2×2 Diagnostic & Epidemiologic Calculator
Adjust the counts below to dynamically compute Sensitivity, Specificity, PPV, NPV, Likelihood Ratios, and Odds Ratio.
Legend: A = TP (true positive), B = FP (false positive), C = FN (false negative), D = TN (true negative).
Counts are whole numbers 0 or higher: decimals round down, blanks count as 0.
| Test result versus disease status | Disease Present (+) | Disease Absent (-) | Row Totals |
|---|---|---|---|
| Test Positive (+) | 0 | ||
| Test Negative (-) | 0 | ||
| Column Totals | 0 | 0 | 0 |
Accuracy
Likelihood ratios
Epidemiology
n/a means the denominator is 0, so the metric is undefined.
Essential Formulas Reference
| Diagnostic Metric | Formula | Clinical Interpretation |
|---|---|---|
| Sensitivity | TP / (TP + FN) | SNOUT: High sensitivity rules OUT disease when negative. Best for screening. |
| Specificity | TN / (TN + FP) | SPIN: High specificity rules IN disease when positive. Best for confirmatory tests. |
| Positive Predictive Value (PPV) | TP / (TP + FP) | Probability that a patient with a positive test actually has the disease. Rises with prevalence. |
| Negative Predictive Value (NPV) | TN / (TN + FN) | Probability that a patient with a negative test is truly disease-free. Falls with prevalence. |
| Positive Likelihood Ratio (LR+) | Sensitivity / (1 - Specificity) | > 10 indicates strong rule-in diagnostic power. |
| Negative Likelihood Ratio (LR-) | (1 - Sensitivity) / Specificity | < 0.1 indicates strong rule-out diagnostic power. |
| Odds Ratio (OR) | (A × D) / (B × C) | Used in Case-Control studies: odds of exposure among cases vs controls. |
| Relative Risk (RR) | [A / (A+B)] / [C / (C+D)] | Used in Cohort studies: risk of disease in exposed vs unexposed. |
| Number Needed to Treat (NNT) | 1 / ARR | `1 / |
| Number Needed to Harm (NNH) | 1 / ARI | `1 / |
Note: the calculator above computes 2x2 metrics only; the RR, NNT, and NNH rows are reference-only.