Skip to content
Omnikalc

Sensitivity, specificity, PPV and NPV calculator

Evaluate a diagnostic or screening test from true and false positives and negatives: sensitivity, specificity, predictive values and likelihood ratios.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Results

Sensitivity

90.0%

Specificity

95.0%

Positive predictive value (PPV)

66.7%

Negative predictive value (NPV)

98.8%

Positive likelihood ratio (LR+)
18.00
Strong evidence to rule in (10 or more)
Negative likelihood ratio (LR−)
0.105
Weaker evidence to rule out
Accuracy
94.5%
Prevalence in this sample
10.0%

How good is a test?

A diagnostic or screening test sorts people into positive and negative. Compared with a reference standard, each result falls into one of four boxes:

Disease present Disease absent
Test positive true positive (TP) false positive (FP)
Test negative false negative (FN) true negative (TN)

The measures

  • Sensitivity = TP ÷ (TP + FN): share of sick people correctly detected.
  • Specificity = TN ÷ (TN + FP): share of healthy people correctly cleared.
  • Positive predictive value PPV = TP ÷ (TP + FP): chance a positive result is correct.
  • Negative predictive value NPV = TN ÷ (TN + FN): chance a negative result is correct.
  • Positive likelihood ratio LR+ = sensitivity ÷ (1 − specificity).
  • Negative likelihood ratio LR− = (1 − sensitivity) ÷ specificity.
  • Accuracy = (TP + TN) ÷ total.

Worked example

1,000 people are tested; 100 have the disease.

Sick Healthy
Positive 90 45
Negative 10 855
  1. Sensitivity: 90 ÷ 100 = 90%.
  2. Specificity: 855 ÷ 900 = 95%.
  3. PPV: 90 ÷ 135 = 66.7%: one positive result in three is a false alarm.
  4. NPV: 855 ÷ 865 = 98.8%.
  5. LR+ = 0.90 ÷ 0.05 = 18; LR− = 0.10 ÷ 0.95 ≈ 0.11.
  6. Accuracy: 94.5%.

Predictive values depend on prevalence

Sensitivity and specificity belong to the test. PPV and NPV also depend on how common the disease is in the people tested. With the same test and a prevalence of 1% instead of 10%, the PPV drops to about 15%. This is why screening a low-risk population produces many false positives, and why positive screening results are confirmed with a second test.

SnNout and SpPin

Two classic memory aids:

  • SnNout: a highly Sensitive test, when Negative, rules the disease out.
  • SpPin: a highly Specific test, when Positive, rules the disease in.

Likelihood ratios in practice

Likelihood ratios convert a pre-test probability into a post-test probability: post-test odds = pre-test odds × LR. An LR+ above 10 or an LR− below 0.1 usually shifts the probability enough to change decisions; values between 0.5 and 2 rarely do.

Trade-offs

Moving a test’s cutoff trades sensitivity against specificity. The ROC curve plots this trade-off; the area under it summarizes overall performance.

This calculator is for general information and education. It is not medical advice and does not replace the judgment of a doctor, nurse or pharmacist who knows the full clinical picture.

Frequently asked questions

What is the difference between sensitivity and specificity?

Sensitivity is the share of sick people who test positive; specificity is the share of healthy people who test negative. A sensitive test rarely misses the disease; a specific test rarely raises false alarms.

What are PPV and NPV?

The positive predictive value is the chance that a positive result is a true positive; the negative predictive value is the chance that a negative result is a true negative. Unlike sensitivity and specificity, they depend on how common the disease is.

What are likelihood ratios?

LR+ = sensitivity ÷ (1 − specificity) and LR− = (1 − sensitivity) ÷ specificity. An LR+ above 10 or an LR− below 0.1 usually changes the probability of disease substantially.

Why is the PPV low when a disease is rare?

Because even a small false positive rate applied to many healthy people produces more false positives than there are true cases. Screening programs often confirm positive results with a second, more specific test.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.