Sensitivity/Specificity Calculator

How Good Is a Test at Finding What It's Looking For

Every diagnostic test makes two kinds of errors: missing a condition that's actually present, and flagging a condition that isn't there. Sensitivity and specificity separate those two failure modes into distinct numbers, drawn from a 2×2 table of test results against confirmed truth, so a test's real-world reliability can be evaluated on paper before it's ever used to make a clinical decision.

The Formula

Sensitivity = TP ÷ (TP + FN) × 100
Specificity = TN ÷ (TN + FP) × 100

The Confusion Matrix

Standard 2×2 diagnostic test outcome table
Condition presentCondition absent
Test positiveTrue Positive (TP)False Positive (FP)
Test negativeFalse Negative (FN)True Negative (TN)

Sensitivity looks only at the "condition present" column (how many were correctly caught); specificity looks only at the "condition absent" column (how many were correctly cleared).

Why Both Numbers Are Needed

  • Screening test design — a screening test is often built for high sensitivity, accepting more false positives, so it rarely misses a true case, with confirmation testing to follow.
  • Confirmatory testing — a follow-up test is often built for high specificity, to avoid falsely confirming a condition that isn't present.
  • Comparing competing tests — two tests with the same overall accuracy can have very different sensitivity/specificity trade-offs, which matters depending on the cost of each type of error.

How to Use This Calculator

  1. Enter the number of True Positives (TP) — correctly identified cases.
  2. Enter the number of False Negatives (FN) — missed cases.
  3. Enter the number of True Negatives (TN) — correctly cleared cases.
  4. Enter the number of False Positives (FP) — incorrectly flagged cases.
  5. Select Calculate to see sensitivity and specificity as percentages.

Related Calculations

Use the PPV/NPV Calculator to see how these numbers translate into the probability a given result is correct, or the Likelihood Ratio Calculator for a single combined diagnostic value.