Diagnostic Test Performance Calculator

Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 12/8/2026

From the 2 × 2 table, sensitivity is TP / (TP + FN), specificity TN / (TN + FP), positive predictive value TP / (TP + FP) and negative predictive value TN / (TN + FN). With 90 TP, 30 FP, 10 FN and 170 TN: sensitivity 90%, specificity 85%, PPV 75%, NPV 94%.

Explanation

To know whether a screening or diagnostic test is reliable, it is compared with a reference: you test people whom you know, by another means, to be sick or not. Results go in a four-cell table: true positives (TP), sick people with a positive test; false positives (FP), healthy people with a positive test; false negatives (FN), sick people with a negative test; and true negatives (TN), healthy people with a negative test. From these four numbers, several indicators are calculated, answering different questions. Sensitivity, TP / (TP + FN), is the proportion of sick people the test detects; specificity, TN / (TN + FP), is the proportion of healthy people the test clears. These are properties of the test itself. Predictive values answer the patient's question: if my test is positive, what is the probability I am sick? That is the positive predictive value, TP / (TP + FP). If my test is negative, what is the probability I am healthy? That is the negative predictive value. Unlike sensitivity and specificity, they depend on disease prevalence: the third example shows it, a test with 95% sensitivity and 95% specificity has a positive predictive value of only about 16% when the disease affects 1% of those tested, because false positives from the many healthy people outnumber true positives among the few sick. Likelihood ratios, LR+ = sensitivity / (1 − specificity) and LR− = (1 − sensitivity) / specificity, do not depend on prevalence and let you move from a pre-test to a post-test probability with Bayes' theorem. Youden's index, sensitivity + specificity − 1, summarizes performance in one number. If a cell of the table is zero, some indicators are undefined, and the calculator then leaves the field empty. A table from a small sample is uncertain; see the confidence interval for a proportion calculator to measure that uncertainty.

Example: a test evaluated on 300 people

Inputs

90 true positives, 30 false positives, 10 false negatives, 170 true negatives.

Calculation

Sensitivity = 90 / 100 = 90%. Specificity = 170 / 200 = 85%. PPV = 90 / 120 = 75%. NPV = 170 / 180 = 94.4%. LR+ = 0.90 / 0.15 = 6. LR− = 0.10 / 0.85 = 0.118.

Result

The test detects 9 of 10 sick people; a positive result means a 75% chance of being sick in this sample, where prevalence is 33%.

Frequently asked questions

What is the difference between sensitivity and positive predictive value?

Sensitivity starts from the sick and measures the share detected. Positive predictive value starts from positive tests and measures the share who are truly sick. The second depends on how common the disease is.

Why does a good test give so many false positives in screening?

When the disease is rare, healthy people are very numerous: even a small proportion of false positives among them produces more cases than true positives among the few sick.

Is an LR+ of 6 good?

An LR+ above 10 is considered strong, between 5 and 10 moderate, and an LR+ near 1 gives no information. The closer LR− is to 0, the more reassuring a negative result.

Related resources

Similar calculators