StatGardenREF. DESK
Calculators/Statistics/Diagnostic test accuracy metrics
Statistics

Diagnostic test accuracy metrics calculator

Sensitivity, specificity, predictive values and accuracy from a 2×2 test result table.

What this calculator does

Diagnostic test accuracy metrics works out sensitivity, specificity, predictive values and accuracy from a 2×2 test result table. Enter your own figures above and the answer updates as you type: nothing is fixed in the code, so the result reflects exactly the numbers you supply.

The formula this calculator evaluates is printed under the tool and explained below, so you can check the working by hand or reuse it in a spreadsheet.

The formula

FormulaSensitivity=TP/(TP+FN); Specificity=TN/(TN+FP); PPV=TP/(TP+FP); NPV=TN/(TN+FN); Youden J = Sens+Spec−1

The inputs explained

FieldWhat to enter
True positivesA number. Starts at 85.
False positivesA number. Starts at 15.
False negativesA number. Starts at 10.
True negativesA number. Starts at 90.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the answer changes with true positives

Every other input is held at the calculator’s starting values while true positives varies. Select any row to load that scenario into the calculator.

How the answer changes with true positives
True positivesSensitivity (recall)SpecificityPrecision (PPV)
42.581.0%85.7%73.9%
63.7586.4%85.7%81.0%
8589.5%85.7%85.0%
12892.8%85.7%89.5%
17094.4%85.7%91.9%
25596.2%85.7%94.4%