Calculators
Sensitivity and Specificity Calculator
Calculate sensitivity, specificity, PPV, NPV, accuracy, F1, MCC, and likelihood ratios from a 2x2 confusion matrix locally in your browser.
Enter the four cells of a 2×2 confusion matrix: True Positives (TP), False Positives (FP), True Negatives (TN), and False Negatives (FN). The calculator returns sensitivity, specificity, predictive values, accuracy, F1, Matthews correlation coefficient, likelihood ratios, and error rates. All calculations run locally in your browser; your values are not uploaded or stored. Prevalence is derived from the entered counts; for a population prevalence adjustment, use the PPV/NPV formulas with your own prevalence estimate.
Evaluate diagnostic test performance from a confusion matrix.
Enter True Positives (TP), False Positives (FP), True Negatives (TN), and False Negatives (FN) to compute sensitivity (TPR), specificity (TNR), positive predictive value (PPV), negative predictive value (NPV), accuracy, F1 score, Matthews correlation coefficient (MCC), positive and negative likelihood ratios (LR+, LR−), false positive rate (FPR), false negative rate (FNR), and prevalence. All calculations run locally in your browser; your values are not uploaded or stored. Prevalence is derived from the entered counts; for a population prevalence adjustment, apply the PPV/NPV formulas with your own prevalence estimate.
Frequently Asked Questions
Everything you need to know about this tool, how it works, and privacy.
What do TP, FP, TN, and FN mean?
TP (True Positives) are correctly identified positive cases. FP (False Positives) are negative cases incorrectly flagged as positive. TN (True Negatives) are correctly identified negative cases. FN (False Negatives) are positive cases incorrectly missed.
How do I interpret sensitivity and specificity?
Sensitivity is the proportion of actual positives correctly identified (TP / (TP + FN)). Specificity is the proportion of actual negatives correctly identified (TN / (TN + FP)). High sensitivity means few false negatives; high specificity means few false positives.
What is the difference between PPV and sensitivity?
Sensitivity is TP / (TP + FN) — of all actual positives, how many were caught. PPV (Positive Predictive Value) is TP / (TP + FP) — of all positive predictions, how many are correct. PPV depends on prevalence; sensitivity does not.
What are likelihood ratios?
LR+ = Sensitivity / (1 − Specificity) tells how much a positive result increases the odds of disease. LR− = (1 − Sensitivity) / Specificity tells how much a negative result decreases the odds. LR+ > 10 and LR− < 0.1 are considered strong.
What is the Matthews correlation coefficient?
MCC = (TP×TN − FP×FN) / √((TP+FP)(TP+FN)(TN+FP)(TN+FN)). It ranges from −1 to +1, where +1 is perfect prediction, 0 is random, and −1 is total disagreement. It is balanced even when classes are imbalanced.
Does prevalence affect the results?
Prevalence is calculated from your entered counts as (TP + FN) / Total. PPV and NPV are prevalence-dependent. If your sample prevalence differs from the population, apply the standard PPV/NPV formulas with your known prevalence for adjusted values.