Sensitivity & Specificity Calculator

Enter TP, FP, FN, TN from a 2x2 confusion matrix to get sensitivity, specificity, PPV, NPV, accuracy, LR+, LR−, and F1 score.

2×2 Confusion Matrix

Enter counts for each cell. All values must be non-negative integers.

Condition
Positive
Condition
Negative
Test
Positive
True Positive
False Positive
Test
Negative
False Negative
True Negative

Fill in the matrix cells and click Calculate to see all metrics.

Copied!

Summary

Enter TP, FP, FN, TN from a 2x2 confusion matrix to get sensitivity, specificity, PPV, NPV, accuracy, LR+, LR−, and F1 score.

How it works

  1. Enter the four cells of your 2x2 confusion matrix: TP, FP, FN, TN.
  2. The calculator instantly computes all diagnostic performance metrics.
  3. Sensitivity (recall) = TP / (TP + FN) — ability to detect true positives.
  4. Specificity = TN / (TN + FP) — ability to rule out true negatives.
  5. PPV and NPV depend on both test performance and disease prevalence in your sample.
  6. Likelihood ratios (LR+ and LR−) summarize the test's discriminating power independent of prevalence.

Use cases

  • Evaluate a clinical screening test after a pilot study.
  • Compare two diagnostic tests using their confusion matrices.
  • Calculate F1 score for a binary machine-learning classifier.
  • Determine whether a lab assay meets regulatory sensitivity thresholds.
  • Assess COVID-19 or infectious disease rapid test performance.
  • Validate a medical device classification algorithm.

Frequently Asked Questions

Last updated: 2026-06-11 · Reviewed by Nham Vu