Roboculator
Online CalculatorsCategoriesDate & EventsNews
Get Started
Online CalculatorsCategoriesDate & EventsNewsGet Started
Roboculator

Smart calculators for every challenge. Free, fast, and private.

Categories

  • Finance
  • Health
  • Math
  • Construction
  • Conversion
  • Everyday Life

Popular Tools

  • Date & Events
  • Loan Calculator
  • BMI Calculator
  • Percentage Calc
  • Latest News
  • Search All

Resources

  • Glossary
  • Topic Tags
  • News & Insights

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy
  • Disclaimer
© 2026 Roboculator. All rights reserved.
Roboculator

roboculator.com

  1. Home
  2. /Statistics
  3. /Probability Calculators
  4. /Sensitivity and Specificity Calculator

Sensitivity and Specificity Calculator

Calculator

Results

Sensitivity (Recall)

0.9474

Specificity

0.989

Positive Predictive Value (PPV)

0.9

Negative Predictive Value (NPV)

0.9944

Accuracy

0.985

Prevalence

0.095

F1 Score

0.9231

Results

Sensitivity (Recall)

0.9474

Specificity

0.989

Positive Predictive Value (PPV)

0.9

Negative Predictive Value (NPV)

0.9944

Accuracy

0.985

Prevalence

0.095

F1 Score

0.9231

The Sensitivity and Specificity Calculator computes all major diagnostic test performance metrics from a 2×2 confusion matrix: sensitivity (recall), specificity, positive predictive value (PPV/precision), negative predictive value (NPV), accuracy, prevalence, and the F1 score.

These metrics are fundamental in clinical medicine, machine learning, quality control, and any binary classification task. Understanding the trade-offs between sensitivity and specificity is essential for choosing appropriate diagnostic thresholds and evaluating classifier performance.

Visual Analysis

How It Works

From a confusion matrix with True Positives (TP), False Positives (FP), False Negatives (FN), and True Negatives (TN):

Sensitivity (True Positive Rate / Recall):

$$\text{Sensitivity} = \frac{TP}{TP + FN}$$

The proportion of actual positives correctly identified.

Specificity (True Negative Rate):

$$\text{Specificity} = \frac{TN}{TN + FP}$$

The proportion of actual negatives correctly identified.

Positive Predictive Value (Precision):

$$PPV = \frac{TP}{TP + FP}$$

Negative Predictive Value:

$$NPV = \frac{TN}{TN + FN}$$

Accuracy:

$$\text{Accuracy} = \frac{TP + TN}{TP + FP + FN + TN}$$

Prevalence:

$$\text{Prevalence} = \frac{TP + FN}{\text{Total}}$$

F1 Score (harmonic mean of precision and recall):

$$F_1 = \frac{2 \times PPV \times \text{Sensitivity}}{PPV + \text{Sensitivity}}$$

Understanding Your Results

High sensitivity means few false negatives — the test catches most positive cases. Critical for ruling out serious diseases (a negative result is reassuring).

High specificity means few false positives — the test rarely triggers false alarms. Critical for confirmation testing (a positive result is reliable).

PPV and NPV depend on prevalence. In low-prevalence settings, even high sensitivity and specificity can yield low PPV (the false positive paradox).

The F1 score balances precision and recall into a single metric, useful when classes are imbalanced. It ranges from 0 (worst) to 1 (perfect).

Worked Examples

Medical Diagnostic Test

Inputs

tp90
fp10
fn5
tn895

Results

sensitivity0.9474
specificity0.989
ppv0.9
npv0.9944
accuracy0.985
prevalence0.095
f1 score0.9231

Excellent test: 94.7% sensitivity, 98.9% specificity, F1 = 0.92. PPV of 90% due to ~10% prevalence.

Spam Filter

Inputs

tp180
fp20
fn30
tn770

Results

sensitivity0.8571
specificity0.9747
ppv0.9
npv0.9625
accuracy0.95
prevalence0.21
f1 score0.878

Spam filter catches 85.7% of spam (sensitivity) with 2.5% false positive rate. F1 = 0.88.

Frequently Asked Questions

Increasing sensitivity (lowering the threshold) typically decreases specificity, and vice versa. This trade-off is visualized by the ROC curve. The optimal balance depends on the relative costs of false positives vs. false negatives.

Prioritize sensitivity when missing a positive case is costly (e.g., cancer screening, infectious disease detection). Prioritize specificity when false positives are harmful (e.g., invasive confirmatory procedures, criminal identification).

With imbalanced classes, accuracy can be high simply by predicting the majority class. If only 1% of samples are positive, always predicting negative gives 99% accuracy but 0% sensitivity. F1 score, AUC, or balanced accuracy are better metrics for imbalanced data.

F1 is the harmonic mean of precision and recall, giving equal weight to both. It is widely used in machine learning for evaluating classifiers on imbalanced datasets. F1 = 1.0 is perfect; F1 = 0 means the classifier is useless.

Sensitivity and specificity are properties of the test (fixed regardless of prevalence). PPV and NPV depend on prevalence — the same test has different predictive values in different populations. This is why screening in low-prevalence settings produces many false positives.

Absolutely. The confusion matrix (TP, FP, FN, TN) is the standard evaluation framework for binary classifiers. This calculator gives you all the standard metrics used in ML: precision, recall, F1, and accuracy.

Sources & Methodology

Altman, D.G. & Bland, J.M. (1994). Diagnostic tests 1: sensitivity and specificity. BMJ, 308, 1552. | Powers, D.M.W. (2011). Evaluation: from precision, recall and F-measure to ROC. J Machine Learning Technologies, 2(1), 37–63. | Parikh, R. et al. (2008). Understanding and using sensitivity, specificity and predictive values. Indian J Ophthalmol, 56(1), 45–50.
R

Roboculator Team

The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.

How helpful was this calculator?

Be the first to rate!

Related Calculators

Lottery Odds Calculator

Probability Calculators

Probability Calculator

Probability Calculators

Conditional Probability Calculator

Probability Calculators

Monty Hall Problem Calculator

Probability Calculators

Combinations Calculator (nCr)

Probability Calculators

Permutations Calculator (nPr)

Probability Calculators