Skip to content
ENExplore Calculators

Specificity Calculator

Calculate specificity, the true negative rate, from a confusion matrix.

About Specificity Calculator

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.

Formula

specificity = TN / (TN + FP)

TN
True negatives
FP
False positives

Worked example

With the default values below, Specificity Calculator returns Specificity (TNR) of 0.98%. Change any input above and every figure here is recalculated in your browser.

Inputs used

True Negatives (TN)accepts 0–1,000,000,000
850
False Positives (FP)accepts 0–1,000,000,000
20

Results

Specificity (TNR)
0.98%
Actual Negatives (TN + FP)
870

Step by step

  1. 1Specificity: TN / (TN + FP)= 0.9770

Assumptions and limits

  • The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

How is specificity different from precision?

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.

When is high specificity most important?

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.

How is specificity related to the false positive rate?

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.

Specificity Calculator – Calculate Specificity (TNR)