Omni calculator
Last updated:

Sensitivity and Specificity Calculator

Table of contents

How to use the sensitivity and specificity calculator?How do I calculate sensitivity?How do I calculate specificity?How do I calculate the accuracy of a test?How to calculate positive predictive value? – PPV, NPVHow do I calculate likelihood ratio?FAQs

Our sensitivity and specificity calculator is the quickest way to calculate all the necessary data needed for medical research statistics and test evaluation.

With our online sensitivity and specificity calculator, you're able to compute PPV, NPV, the positive and negative likelihood ratio, and the accuracy (see accuracy calculator).

We'll show you how to calculate the negative predictive value from sensitivity and specificity, explain the sensitivity of a test, and describe all you need to know about the NPV and PPV in statistics.

How to use the sensitivity and specificity calculator?

Calculating sensitivity, specificity, PPV, and NPV requires the same four pieces of information:

  1. Number of true positive cases (TP) ✅✅

    Number of people with the disease who tested positive.

  2. Number of true negative cases (TN) ❌❌

    Number of people without the disease who tested negative.

  3. Number of false positive cases (FP) ❌✅

    Number of people without the disease who tested positive.

  4. Number of false negative cases (FN) ✅❌

    Number of people with the disease who tested negative.

↓ Find these values with our 2x2 table method presented below. ↓

2x2 table for sensitivity and specificity

sensitivity and specificity table

Take a longer look at the table – it's an easy, visual way to understand the meaning of all presented variables.

How do I calculate sensitivity?

Sensitivity – the proportion of people with the disease who tested positive compared to the number of all the people with the disease, regardless of their test result.

To calculate sensitivity, we'll need:

  • Number of true positive cases (TP); and
  • Number of false negative cases (FN).

And the following sensitivity equation:

Sensitivity = TP / (TP + FN)

TP + FN = Total number of people with the disease; and

TN + FP = Total number of people without the disease.

How do I calculate specificity?

Specificity – the proportion of healthy people that tested negative compared to the total number of people without the disease, no matter their test result.

To calculate specificity, we'll need:

  • Number of true negative cases (TN); and
  • Number of false positive cases (FP).

And the following specificity equation:

Specificity = TN / (FP + TN)

You might also be interested in a couple of our other statistical calculations, such as the T-test calculator and the standard deviation calculator.

How do I calculate the accuracy of a test?

Accuracy is just the ratio of correct results to all the results of a test.

The accuracy formula is one of the easiest ones to remember:

Accuracy = (TP + TN) / (TP + TN + FP + FN)

How to calculate positive predictive value? – PPV, NPV

Here we present the theoretical basis of our NPV and PPV calculator – this is how we can calculate the Negative Predictive Value from sensitivity and specificity.

You'll need:

  • Sensitivity (also: true positive, false negative);
  • Specificity (also: true negative, false positive); and
  • Prevalence – the amount of the population affected by a particular disease at the time you are interested in, given in %.

Follow the Positive Predictive Value formula (PPV) presented below:

PPV = (Sensitivity × Prevalence)/[(Sensitivity × Prevalence) + ((1 - Specificity) × (1 - Prevalence))]

PPV depends on the prevalence – it measures the precision of a test, which is the probability that a positive test result is indeed correct.

Negative Predictive Value formula (NPV):

NPV =(Specificity × (1 - Prevalence))/[((1 - Sensitivity) × Prevalence) + (Specificity × (1 - Prevalence))]

NPV also depends on the prevalence of the disease – it describes the probability that a negative test result is indeed correct.

In the next section, we'll explain the principles behind our probability ratios calculator.

How do I calculate likelihood ratio?

To compute the positive and negative likelihood ratio given sensitivity and specificity, apply the following formulas:

  1. Positive likelihood ratio:

    Positive likelihood ratio = Sensitivity / (1 - Specificity)

  2. Negative likelihood ratio:

    Negative likelihood ratio = (1 - Sensitivity) / Specificity

Have you already calculated everything for your test's statistical evaluation? Step up the game and try our post-test probability calculator. 🎲

FAQs

How do I compute PPV given TP and FP?

PPV = TP / (TP + FP). That is, PPV is the proportion of true positive results to all positive results (both true and false positives).

How do I interpret the positive likelihood ratio?

Both positive and negative likelihood ratios describe the value of a test:

  • Positive likelihood ratio represents the possibility that the person with the disease will test positive; and

  • Negative likelihood ratio represents the possibility that the healthy person will test negative.

How do I interpret the positive predictive value PPV?

Here's how to understand the values of PPV and NPV:

  • PPV measures the precision of a test, which is the probability that a positive test result is indeed correct; while

  • NPV measures the probability that a negative test result is correct.

Inputs

Table for sensitivity and specificity.

Results

Check out 33 similar probability theory and odds calculators 🎲
AccuracyBayes theoremBertrand's box paradox...30 more