Home / 🚀 Probability Theory & Odds/ Sensitivity and Specificity Calculator

Sensitivity and Specificity Calculator

Print Page
Diagnostic Test Raw Counts
Reset Form
Diagnostic Metrics
Sensitivity
-
Specificity
-
Positive Predictive Value (PPV): -
Negative Predictive Value (NPV): -
Accuracy: -
Prevalence in Sample: -
Calculation Equations
Insert inputs.

A Sensitivity and Specificity Calculator (also known as a Diagnostic Test Accuracy Calculator, PPV & NPV 2×2 Matrix Utility, Medical Confusion Matrix Analyzer, or Likelihood Ratio Diagnostic Test Calculator) computes key diagnostic metrics including Sensitivity (TPR = TP ÷ [TP + FN]), Specificity (TNR = TN ÷ [TN + FP]), Positive Predictive Value (PPV = TP ÷ [TP + FP]), Negative Predictive Value (NPV = TN ÷ [TN + FN]), Overall Accuracy ([TP + TN] ÷ N), and Likelihood Ratios (LR+ / LR-) from a standard 2 × 2 clinical contingency table.

In medical testing and machine learning classification, Sensitivity measures a test’s ability to correctly identify patients who have the disease (low false negative rate), whereas Specificity measures its ability to correctly identify individuals who are healthy (low false positive rate). Furthermore, PPV and NPV reflect real-world clinical utility because they adjust test results for baseline disease prevalence in the population.

Our free online Sensitivity and Specificity Calculator provides instant calculations across all diagnostic parameters:

  • Sensitivity / True Positive Rate (TPR): Sensitivity = TP ÷ (TP + FN) · 100%.
  • Specificity / True Negative Rate (TNR): Specificity = TN ÷ (TN + FP) · 100%.
  • Positive Predictive Value (PPV): PPV = TP ÷ (TP + FP) · 100%.
  • Negative Predictive Value (NPV): NPV = TN ÷ (TN + FN) · 100%.
  • Overall Diagnostic Accuracy: Accuracy = (TP + TN) ÷ (TP + TN + FP + FN) · 100%.
  • Positive Likelihood Ratio (LR+): LR+ = Sensitivity ÷ (1 - Specificity).
  • Negative Likelihood Ratio (LR): LR- = (1 - Sensitivity) ÷ Specificity.

Master Diagnostic Test Accuracy & Predictive Value Reference Table

The table below displays the 2×2 confusion matrix inputs, Sensitivity, Specificity, PPV, NPV, Overall Accuracy, and Likelihood Ratios across common medical screening tests:

Diagnostic Screening Test 2×2 Matrix Counts (TP / FP / FN / TN) Sensitivity (TPR) Specificity (TNR) PPV (Post-Test Prob +) NPV (Post-Test Prob -) Diagnostic Accuracy Likelihood Ratio (LR+)
Rapid Antigen COVID-19 Test 180 / 10 / 20 / 790 (N=1,000) 90.00% 98.75% 94.74% 97.53% 97.00% 72.00 (Conclusive)
Screening Mammography (1% Prev) 85 / 80 / 15 / 9,820 (N=10,000) 85.00% 99.19% 51.52% (Prevalence Effect!) 99.85% 99.05% 104.94
Rapid Strep Throat Swab 340 / 30 / 60 / 570 (N=1,000) 85.00% 95.00% 91.89% 90.48% 91.00% 17.00
D-Dimer PE Rule-Out Assay 190 / 400 / 10 / 400 (N=1,000) 95.00% (High Sens) 50.00% (Low Spec) 32.20% 97.56% (High NPV) 59.00% 1.90

Step-by-Step Rapid Antigen Test & Mammography Calculations

To calculate Sensitivity, Specificity, PPV, NPV, and Accuracy for a Rapid COVID-19 Antigen Test (TP=180, FP=10, FN=20, TN=790; N=1,000), and calculate PPV for a Screening Mammography (Prevalence=1.0%, TP=85, FP=80, FN=15, TN=9,820):

Step 1 (Calculate COVID Sensitivity): Sensitivity = TP ÷ (TP + FN) = 180 ÷ (180 + 20) = 180 ÷ 200 = 0.9000 = 90.00%

Step 2 (Calculate COVID Specificity): Specificity = TN ÷ (TN + FP) = 790 ÷ (790 + 10) = 790 ÷ 800 = 0.9875 = 98.75%

Step 3 (Calculate COVID Positive Predictive Value PPV): PPV = TP ÷ (TP + FP) = 180 ÷ (180 + 10) = 180 ÷ 190 = 0.947368 ≈ 94.74%

Step 4 (Calculate COVID Negative Predictive Value NPV): NPV = TN ÷ (TN + FN) = 790 ÷ (790 + 20) = 790 ÷ 810 = 0.975308 ≈ 97.53%

Step 5 (Calculate COVID Diagnostic Accuracy): Accuracy = (180 + 790) ÷ 1,000 = 970 ÷ 1,000 = 0.9700 = 97.00%

Step 6 (Calculate Mammography PPV under Low 1% Prevalence): PPV = 85 ÷ (85 + 80) = 85 ÷ 165 = 0.515152 ≈ 51.52%

Thus, the COVID test achieves 90.0% Sensitivity and 98.75% Specificity (94.74% PPV), whereas in low-prevalence screening (1%), a 99.19% specific mammography test yields a 51.52% PPV (meaning nearly half of positive screening results are false positives requiring confirmatory biopsy).


Clinical Diagnostic Rules: SnNout vs. SpIn

Below is a comparative reference chart detailing the classic clinical mnemonic rules for diagnostic test selection:

Clinical Diagnostic Mnemonic Primary Test Property Required Test Result Outcome Clinical Decision Conclusion
SnNout (High Sensitivity) High Sensitivity (Low False Negatives) Negative Test Result Rules OUT Disease (High NPV)
SpPIn (High Specificity) High Specificity (Low False Positives) Positive Test Result Rules IN Disease (High PPV)

History & Medicine: 1947 Jacob Yerushalmy to 1988 Hanley & McNeil

1947 Jacob Yerushalmy & Radiology Screening

In 1947, biostatistician Jacob Yerushalmy published a landmark paper in Public Health Reports, introducing the formal mathematical concepts of Sensitivity and Specificity to evaluate X-ray screening accuracy for tuberculosis.

1988 Hanley & McNeil (ROC Curves & AUC)

In 1988, biostatisticians James Hanley and Barbara McNeil published foundational methodology standardizing Receiver Operating Characteristic (ROC) curve analysis and Area Under the Curve (AUC) for medical diagnostic decision-making.


Popular direct tools:


Frequently Asked Questions (FAQ)

What is Sensitivity in medical testing?

Sensitivity is the percentage of actual positive disease cases that are correctly identified by the test (Sensitivity = TP ÷ [TP + FN]).

What is Specificity in medical testing?

Specificity is the percentage of healthy non-diseased individuals that are correctly identified as negative by the test (Specificity = TN ÷ [TN + FP]).

What is the difference between Sensitivity/Specificity and PPV/NPV?

Sensitivity and Specificity are intrinsic properties of the test itself, whereas PPV and NPV depend heavily on disease prevalence in the population being tested.