Paritian

Statistics

Sensitivity and Specificity Calculator (Diagnostic Test Accuracy, PPV, NPV)

Sensitivity, specificity, predictive values, accuracy and likelihood ratios from the four counts of a test result table, and the predictive values at any other prevalence.

Results

Sensitivity (sick people the test catches) 90.00 %
Specificity (healthy people it clears) 95.56 %
Positive predictive value (positive is right) 69.23 %
Negative predictive value (negative is right) 98.85 %
Accuracy (all results right) 95.00 %
Prevalence in this table 10.00 %
Positive likelihood ratio (0 if undefined) 20.25
Negative likelihood ratio (0 if undefined) 0.105
Youden's J (sensitivity + specificity − 1) 0.856
Positive predictive value at that prevalence 16.98 %
Negative predictive value at that prevalence 99.89 %
How it changes
Positive predictive value at that prevalencePrevalence 1 – 50. Positive predictive value at that prevalence: 9.23603 → 95.2941; Negative predictive value at that prevalence: 99.9474 → 90.5263Positive predictive value at that prevalenceNegative predictive value at that prevalence0204060801001020304050Prevalence (%)

The dashed line marks the value you entered.

What this tool does

Sensitivity is the share of people who really have the condition that the test catches; specificity is the share of people without it that the test clears. Neither tells you what a positive result means for one person: that depends on how common the condition is. A test that is 90 % sensitive and 95 % specific gives a positive that is right only about 15 % of the time when 1 % of people have the condition, because the many healthy people produce more false alarms than the few sick ones produce true ones. Enter the prevalence of your own population to see the predictive values change. Counts from a study table carry its own prevalence, which may not match real life.

Formula

sensitivity = TP ÷ (TP + FN) · specificity = TN ÷ (TN + FP) · PPV = TP ÷ (TP + FP) · NPV = TN ÷ (TN + FN) · PPV at prevalence π = Se·π ÷ (Se·π + (1 − Sp)(1 − π))

Variables

SymbolMeaningUnit
tpTrue positives (sick, test positive)—
fpFalse positives (healthy, test positive)—
fnFalse negatives (sick, test negative)—
tnTrue negatives (healthy, test negative)—
pvPrevalence to apply (optional)%
SESensitivity (sick people the test catches)%
SPSpecificity (healthy people it clears)%
PPVPositive predictive value (positive is right)%
NPVNegative predictive value (negative is right)%
ACAccuracy (all results right)%
PRPrevalence in this table%
LPPositive likelihood ratio (0 if undefined)—
LNNegative likelihood ratio (0 if undefined)—
YJYouden's J (sensitivity + specificity − 1)—
PPPositive predictive value at that prevalence%
NPNegative predictive value at that prevalence%

Worked example

  • True positives (sick, test positive)90
  • False positives (healthy, test positive)40
  • False negatives (sick, test negative)10
  • True negatives (healthy, test negative)860
  • Prevalence to apply (optional)1 %
  • Sensitivity (sick people the test catches)90.00 %
  • Specificity (healthy people it clears)95.56 %
  • Positive predictive value (positive is right)69.23 %
  • Negative predictive value (negative is right)98.85 %
  • Accuracy (all results right)95.00 %
  • Prevalence in this table10.00 %
  • Positive likelihood ratio (0 if undefined)20.25
  • Negative likelihood ratio (0 if undefined)0.105
  • Youden's J (sensitivity + specificity − 1)0.856
  • Positive predictive value at that prevalence16.98 %
  • Negative predictive value at that prevalence99.89 %

Limitations

  • This tool is informational only. It does not diagnose, treat or replace a qualified health professional. Speak to a doctor before making decisions about your health.
  • The calculation runs at full precision and only the display is rounded. If you copy an intermediate value and retype it, small differences can appear.