Test Specificity Calculator


Instructions: This Specificity Calculator computes the specificity of a test, showing step-by-step all calculation. To that end, please fill up the required table with the information about disease presence and absence, and screening test status:

Test +
Test -
Disease Present
Disease Absent

More about this Test Specificity Calculator

The specificity of a test corresponds to the probability that the test shows negative for people who do not have the disease. In other words, it is a measure of the ability of the test to correctly detect negative cases.

How do you compute the specificity of a test?

Consider the following 2x2 cross tabulation that shows information about the results of a screening test and presence of the disease for a sample of individuals:

Disease Present
Disease Absent
Test +
\(TP\)
\(FP\)
Test -
\(FN\)
\(TN\)

• The value \(TP\) corresponds to the number of true positive cases, which is when the test shows positive for patients with the condition.

• The value \(FP\) corresponds to the number of false positive cases, which is when the test shows positive for patients who don't have the condition.

• The value \(FN\) corresponds to the number of false negative cases, which is when the test shows negative for patients with the condition.

• The value \(TN\) corresponds to the number of true negative cases, which is when the test shows negative for patients who don't have the condition.

Observe that \(TN + FP\) is the total number of negative cases (people without the condition), the specificity of the test is computed using the following formula

\[\text{Specificity} = \displaystyle \frac{TN}{TN + FP}\]

What are other related metrics to Specificity of a test?

When measuring the quality of a screening test, you may be interested in the sensitivity of the test , in the positive predictive value (PPV), as well as the negative predictive value (NPV).

How to calculate sensitivity and specificity in excel

You need to follow the same calculation formula used above to compute the sensitivity and specificity of a test in Excel. First, you need to put the elements in the crosstabulation form specified above.

Does it matter the order of the inputs in the table?

You have to make sure that you identify correctly the position of \(TP\), \(TN\), \(FP\) and \(FP\), because the specificity you will calculate depends on the order to the inputs in the table. If you put in the wrong order, your calculation of the specificity will likely be wrong.

log in to your account

Don't have a membership account?
REGISTER

reset password

Back to
log in

sign up

Back to
log in