Home · Statistics · Probability & Combinatorics · Sensitivity and Specificity Calculator
Sensitivity and Specificity Calculator
Sensitivity and specificity of a test from its confusion matrix: how often it catches the condition when present, and how often it clears it when absent.
What this calculator does
Sensitivity and specificity of a test from its confusion matrix: how often it catches the condition when present, and how often it clears it when absent. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.
The formula and method
Sensitivity conditions on the truly positive cases only: of all who have the condition, the share the test flags.
Specificity conditions on the truly negative cases only: of all who lack the condition, the share the test clears.
Neither depends on prevalence, but the predictive value of a positive result does — see the Post-Test Probability Calculator.
Worked example
With the example inputs this page opens with (true positives 80, false positives 10, false negatives 20, true negatives 90), the result is 80.00. Change any figure and the result updates with the same formula.
Quick reference
| True positives | Result |
|---|---|
| 40 | 66.67 |
| 64 | 76.19 |
| 80 | 80.00 |
| 100 | 83.33 |
| 120 | 85.71 |
| 160 | 88.89 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
Which matters more, sensitivity or specificity?
It depends on the error you fear. Screening tests favour sensitivity so cases are not missed; confirmatory tests favour specificity so healthy people are not falsely labelled. The two usually trade off as the threshold moves.
Can a test have 100% sensitivity and specificity?
Only a perfect test. Real tests trade the two off: lowering the positive threshold catches more true cases (sensitivity up) at the price of more false alarms (specificity down).
How does the Sensitivity and Specificity Calculator work?
Sensitivity and specificity of a test from its confusion matrix: how often it catches the condition when present, and how often it clears it when absent. True positives · False positives · False negatives · True negatives → Sensitivity (%). The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Sensitivity and Specificity Calculator need?
True positives · False positives · False negatives · True negatives → Sensitivity (%). Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.