Specificity measures how well a test clears people who do not have a condition. Of everyone who is truly negative, what share does the test call negative? If 500 healthy people are tested and 450 get a negative result, the specificity is 450 ÷ 500 = 90%; the other 50 are false positives, a false positive rate of 10%.
Highly specific tests are used to rule conditions in: if a 99%-specific test comes back positive, the condition is likely (“SpPin”). But specificity ignores the people who have the condition (a test that calls everyone negative is 100% specific and finds nobody), so read it alongside sensitivity.
Enter true negatives and false positives for the specificity and false positive rate. Add the true positives and false negatives to get sensitivity, positive and negative predictive values for your sample, accuracy, both likelihood ratios and Youden’s index, which combines sensitivity and specificity into one number.
How to use the Specificity Calculator
- True negatives (TN)
- False positives (FP)
- Also enter the positives (TP and FN)?
- True positives (TP)
- False negatives (FN)
Results update as you type, and everything is calculated in your browser.
How it works
Specificity divides the true negatives by everyone who truly does not have the condition (TN + FP). With the positives entered, the full 2 × 2 table gives the remaining measures.
Worked example
500 people without the disease are tested: 450 negative, 50 positive. Specificity = 450 ÷ 500 = 90%, false positive rate = 10%. With 40 true positives and 10 false negatives among 50 cases, sensitivity = 80%, PPV = 40 ÷ 90 = 44.44%, NPV = 450 ÷ 460 = 97.83%, accuracy = 490 ÷ 550 = 89.09%, LR+ = 0.8 ÷ 0.1 = 8 and Youden’s index = 0.7.
Specificity and false alarms per 1,000 healthy people
| Specificity | False positives |
|---|---|
| 99.9% | 1 |
| 99% | 10 |
| 95% | 50 |
| 90% | 100 |
| 80% | 200 |
Inputs explained
| Field | What to enter |
|---|---|
| True negatives (TN) | A number |
| False positives (FP) | A number |
| Also enter the positives (TP and FN)? | Choose one: Yes, No |
| True positives (TP) | A number |
| False negatives (FN) | A number |
What each result means
- Specificity (true negative rate) = [True negatives (TN)]÷([True negatives (TN)] + [False positives (FP)])×100
- False positive rate = 100 – [Specificity (true negative rate)]
- People without the condition (TN + FP) = [True negatives (TN)] + [False positives (FP)]
- Sensitivity = [True positives (TP)]÷([True positives (TP)] + [False negatives (FN)])×100
- Positive predictive value = [True positives (TP)]÷([True positives (TP)] + [False positives (FP)])×100
- Negative predictive value = [True negatives (TN)]÷([True negatives (TN)] + [False negatives (FN)])×100
- Accuracy = ([True positives (TP)] + [True negatives (TN)])÷([True positives (TP)] + [False negatives (FN)] + [True negatives (TN)] + [False positives (FP)])×100
- Positive likelihood ratio = [Sensitivity]÷(100 – [Specificity (true negative rate)])
- Negative likelihood ratio = (100 – [Sensitivity])÷[Specificity (true negative rate)]
- Youden’s index = ([Sensitivity] + [Specificity (true negative rate)])÷100 – 1
Formula
Specificity = TN ÷ (TN + FP)
False positive rate = FP ÷ (TN + FP) = 1 − specificity
Worked example
Inputs: True negatives (TN): 450; False positives (FP): 50; Also enter the positives (TP and FN)?: Yes; True positives (TP): 40; False negatives (FN): 10.
Results: Specificity (true negative rate) = 90 %; False positive rate = 10 %; People without the condition (TN + FP) = 500; Sensitivity = 80 %; Positive predictive value = 44.4444 %; Negative predictive value = 97.8261 %; Accuracy = 89.0909 %; Positive likelihood ratio = 8; Negative likelihood ratio = 0.2222; Youden’s index = 0.7.
Key terms
- Specificity
- The proportion of people without the condition who test negative.
- True negative
- A negative result in someone without the condition.
- False positive rate
- FP ÷ (TN + FP) = 1 − specificity.
Frequently asked questions
How do you calculate specificity?
Divide the true negatives by all people without the condition: TN ÷ (TN + FP). 450 ÷ 500 = 90%.
What is the relationship between specificity and the false positive rate?
They add to 100%: 90% specificity means a 10% false positive rate.
Why can a highly specific test still give many false positives?
When the condition is rare, the unaffected group is huge, so even 1% of it can outnumber the true cases.
What does SpPin mean?
A highly Specific test, when Positive, helps rule the condition in.
Does specificity depend on prevalence?
No, it is computed only among people without the condition; predictive values do depend on prevalence.
What is Youden’s index?
Sensitivity + specificity − 1; here 0.8 + 0.9 − 1 = 0.7.