Sensitivity and Specificity Calculator
Test cases replayed : 2 of 2 match · Methodology · No outside source listed
Enter the four counts of a 2×2 table (true and false positives, false and true negatives) to get the sensitivity, specificity, predictive values and likelihood ratios of the test.
Result
Sensitivity
Specificity (%)
- Positive predictive value (%)
- Negative predictive value (%)
- Positive likelihood ratio (LR+)
- Negative likelihood ratio (LR−)
- Accuracy (%)
- Prevalence in this table (%)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- True positives (condition present, test positive): enter 0 or more.
- False positives (condition absent, test positive): enter 0 or more.
- False negatives (condition present, test negative): enter 0 or more.
- True negatives (condition absent, test negative): enter 0 or more.
- Read the result: Sensitivity; the panel also shows Specificity (%), Positive predictive value (%), Negative predictive value (%), Positive likelihood ratio (LR+), Negative likelihood ratio (LR−), Accuracy (%) and Prevalence in this table (%).
How this calculator works
Sensitivity = TP ÷ (TP + FN); specificity = TN ÷ (TN + FP). Positive predictive value PPV = TP ÷ (TP + FP); negative predictive value NPV = TN ÷ (TN + FN).
Likelihood ratios: LR+ = sensitivity ÷ (1 − specificity), LR− = (1 − sensitivity) ÷ specificity. Accuracy = (TP + TN) ÷ total; prevalence = (TP + FN) ÷ total.
Sensitivity, specificity and likelihood ratios describe the test; PPV and NPV also depend on the prevalence in the group tested, so they apply only to a group with the same prevalence as the table.
This is a statistics tool for describing a test or a study; the result is not a diagnosis and says nothing on its own about one person.
The formula
| Symbol | Meaning | Unit |
|---|---|---|
| True positives (condition present, test positive) | ||
| False negatives (condition present, test negative) | ||
| Sensitivity | % |
Worked example
| True positives (condition present, test positive) | 90 |
|---|---|
| False positives (condition absent, test positive) | 30 |
| False negatives (condition present, test negative) | 10 |
| True negatives (condition absent, test negative) | 870 |
| Specificity (%) | 96.67% |
|---|---|
| Positive predictive value (%) | 75% |
| Negative predictive value (%) | 98.86% |
| Positive likelihood ratio (LR+) | 27 |
| Negative likelihood ratio (LR−) | 0.1034 |
| Accuracy (%) | 96% |
| Prevalence in this table (%) | 10% |
Sensitivity 90%
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
With 90 true positives, 30 false positives, 10 false negatives and 870 true negatives, what are sensitivity and specificity?
Sensitivity = 90 ÷ 100 = 90%; specificity = 870 ÷ 900 = 96.67%. The PPV is 90 ÷ 120 = 75% and LR+ is 27.
What is the difference between sensitivity and PPV?
Sensitivity is the share of sick people who test positive; PPV is the share of positive tests that come from sick people. PPV falls when the condition is rare.