Sensitivity, specificity and predictive values

Enter the true and false positives and negatives of a test to get sensitivity, specificity, predictive values, likelihood ratios and accuracy.

Your data does not go to our server. This tool runs in your browser; what you type or open never leaves your device.

This calculator needs JavaScript, because it calculates in your browser and sends nothing. Turn JavaScript on to use it. How it is calculated is explained below.

How it is calculated

Proportions get Wilson score intervals. Predictive values follow Bayes' rule, so they change with the prevalence you enter; with no prevalence they come straight from the table.

A likelihood ratio that cannot be calculated (division by zero) is shown as ∞ or a dash, never as a number.

  • Sensitivity = TP / (TP + FN); Specificity = TN / (TN + FP)
  • PPV = Se × Prev / [Se × Prev + (1 − Sp) × (1 − Prev)]
  • LR+ = Se / (1 − Sp); LR− = (1 − Se) / Sp

Worked example: TP 20, FP 180, FN 10, TN 1820: sensitivity 66.7 %, specificity 91.0 %, PPV 10.0 %, NPV 99.5 %.

Sources

These calculators support research; they do not replace the advice of a statistician or a clinician.

Questions

Why do the predictive values depend on prevalence?

Sensitivity and specificity describe the test; the chance that a positive result is right also depends on how common the disease is. Enter the prevalence of your population to see its predictive values.

All free tools

WhatsApp Tell the Editor
Submit manuscript Contact