InfyCalculator
📊

Sensitivity and Specificity Calculator

Evaluate a diagnostic test from its confusion matrix — sensitivity, specificity, PPV, NPV and accuracy from true/false positives and negatives.

True positives (TP)
False negatives (FN)
True negatives (TN)
False positives (FP)
Loading calculator…

How it works

Sensitivity = TP ÷ (TP + FN) · Specificity = TN ÷ (TN + FP) · PPV = TP ÷ (TP + FP) · NPV = TN ÷ (TN + FN) · Accuracy = (TP + TN) ÷ total

Sensitivity is the share of truly positive cases a test correctly identifies, and specificity is the share of truly negative cases it correctly clears — the two core properties of a diagnostic test. The predictive values flip the question to the patient’s side: given a positive result, how likely is disease (PPV), and given a negative result, how likely is health (NPV). Crucially, sensitivity and specificity are properties of the test, while PPV and NPV also depend on how common the condition is in the tested population.

Worked example

With TP = 90, FN = 10, TN = 85, FP = 15: sensitivity is 90 ÷ (90 + 10) = 90%, specificity is 85 ÷ (85 + 15) = 85%. PPV is 90 ÷ (90 + 15) ≈ 85.7% and NPV is 85 ÷ (85 + 10) ≈ 89.5%, giving an overall accuracy of (90 + 85) ÷ 200 = 87.5%.

Sources: Sensitivity and specificity — Wikipedia

Frequently asked questions

What is the difference between sensitivity and specificity?

Sensitivity measures how well a test detects people who truly have the condition (few false negatives), while specificity measures how well it clears people who truly do not (few false positives). A screening test favors high sensitivity; a confirmatory test favors high specificity.

Why do PPV and NPV depend on prevalence?

Sensitivity and specificity are fixed properties of the test, but predictive values answer "given my result, what are the odds?" — which shifts with how common the disease is. The same test has a much lower PPV in a low-prevalence population, because most positives are then false positives.

Is high accuracy enough to judge a test?

No. Accuracy can be misleading when a condition is rare: a test that calls everyone negative can score 99% accuracy while catching zero real cases. That is why sensitivity, specificity and the predictive values are reported instead of accuracy alone.

Related calculators

For education only — not medical advice. Clinical measures depend on study design and prevalence; consult a professional before acting on them.