Specificity Calculator

Calculate specificity — the true negative rate — from a diagnostic test's true negatives and false positives using Specificity = TN / (TN + FP).

Quick Facts

Formula
Specificity = TN / (TN + FP)
The true negative rate: the share of truly healthy people the test correctly clears.

Your Results

Calculated
Specificity
-
TN / (TN + FP)
Specificity (decimal)
-
Proportion from 0 to 1
False positive rate
-
1 - specificity = FP / (TN + FP)
Healthy people tested
-
TN + FP

Ready

Enter the true negative and false positive counts, then calculate.

What specificity measures

Specificity, also called the true negative rate, tells you how well a test correctly identifies people who do not have a condition. It answers the question: of everyone who is genuinely healthy (disease-free), what fraction did the test correctly clear? A highly specific test rarely raises a false alarm in healthy people.

The formula

Specificity is computed from two cells of a 2×2 confusion matrix:

Specificity = TN / (TN + FP)

  • TN (true negatives) — people without the condition who correctly test negative.
  • FP (false positives) — people without the condition who incorrectly test positive (a false alarm).

The denominator TN + FP is the total number of people who truly do not have the condition. Specificity ranges from 0 to 1 (0% to 100%). It ignores the sick group entirely — the true positives and false negatives play no part in the specificity calculation.

Worked example

Suppose a screening test is run on 100 people who are known to be disease-free. It correctly returns a negative result for 80 of them (TN = 80) but incorrectly flags 20 as positive (FP = 20). Then specificity = 80 / (80 + 20) = 80 / 100 = 0.80, or 80%. Equivalently, the false positive rate is 1 − 0.80 = 0.20, meaning 20% of healthy people are wrongly flagged.

Specificity versus sensitivity

Specificity is the partner of sensitivity (the true positive rate, TP / (TP + FN)). Sensitivity measures how well a test catches the people who do have the condition; specificity measures how well it clears the people who do not. The two are computed from different halves of the confusion matrix, so a test can be strong in one and weak in the other. Both are usually reported together because neither alone describes a test's performance. A useful memory aid: SpPin — a highly Specific test, when Positive, rules in the disease.

Common reference points

  • A specificity of 1.0 (100%) means zero false positives — every healthy person tests negative.
  • Confirmatory tests are deliberately built for high specificity (often >99%) so that a positive result is trustworthy and few healthy people are wrongly alarmed.
  • Broad screening tests often sacrifice some specificity to gain sensitivity, accepting more false positives so that fewer true cases are missed; positives are then re-checked with a more specific confirmatory test.

Frequently Asked Questions

What is the formula for specificity?
Specificity = TN / (TN + FP), where TN is the number of true negatives and FP is the number of false positives. The denominator is the total number of people who do not have the condition. The result is the true negative rate, a proportion between 0 and 1 (or 0% to 100%).
What is the difference between specificity and sensitivity?
Specificity = TN / (TN + FP) measures how well a test correctly clears healthy people (few false positives). Sensitivity = TP / (TP + FN) measures how well a test catches sick people (few false negatives). They use different cells of the confusion matrix, so a test can score high on one and low on the other — that is why both are reported together.
Does specificity depend on how common the disease is?
No. Specificity is calculated only from people who do not have the condition (TN and FP), so it is independent of prevalence. Prevalence affects the positive and negative predictive values, but not specificity or sensitivity, which are intrinsic properties of the test.