Calculate specificity, the true negative rate, from a confusion matrix.
Specificity, also called the true negative rate (TNR), measures how many of the actual negative cases the model correctly identified as negative: specificity = TN / (TN + FP). High specificity means few false alarms among true negatives. It's the mirror image of sensitivity/recall (which focuses on the positive class), and the pair together fully describe a binary classifier's behavior on both classes — this pair is exactly what's plotted on the ROC curve.
specificity = TN / (TN + FP)
Specificity measures correctness among actual negatives (TN / (TN+FP)), while precision measures correctness among predicted positives (TP / (TP+FP)) — they use different denominators and answer different questions.
High specificity matters most when false positives are costly or disruptive, such as flagging healthy patients for invasive follow-up testing, or blocking legitimate users as fraudulent.
False positive rate (FPR) = 1 − specificity, so they're direct complements — the ROC curve's x-axis (FPR) is simply one minus this calculator's output.