Sensitivity & Specificity Calculator
Evaluate the performance of a diagnostic test by entering the true positive, false positive, false negative, and true negative values from a 2ร2 contingency table.
Sensitivity & Specificity
intermediateCalculate diagnostic test performance metrics from 2x2 table
Formula
Sens = TP/(TP+FN), Spec = TN/(TN+FP)
How It Works
A 2ร2 contingency table compares test results against the true disease status:
| Disease (+) | Disease (โ) | |
|---|---|---|
| Test (+) | TP (True Positive) | FP (False Positive) |
| Test (โ) | FN (False Negative) | TN (True Negative) |
Sensitivity = TP/(TP+FN) โ ability to detect disease when present
Specificity = TN/(TN+FP) โ ability to rule out disease when absent
PPV = TP/(TP+FP) โ probability disease is present given positive test
NPV = TN/(TN+FN) โ probability disease is absent given negative test
Accuracy = (TP+TN)/(TP+TN+FP+FN) โ overall proportion correct
Example
A rapid COVID-19 test was evaluated on 200 patients. Results: TP=85, FP=10, FN=15, TN=90.
Sensitivity = 85/100 = 85.0%
Specificity = 90/100 = 90.0%
PPV = 85/95 = 89.5%
NPV = 90/105 = 85.7%
Accuracy = 175/200 = 87.5%
Frequently Asked Questions
What is a good sensitivity value?
For screening tests, high sensitivity (>95%) is preferred to avoid missing cases. For confirmatory tests, high specificity is prioritized. There is always a trade-off between the two.
How does prevalence affect PPV and NPV?
PPV increases with disease prevalence โ the same test performs differently in low-prevalence vs high-prevalence populations. This is known as the disease probability paradox.
What is the difference between sensitivity and PPV?
Sensitivity measures how well a test identifies those WITH the disease (test-positive among diseased). PPV measures the probability that a positive test actually means the person has the disease.