Connect via MCP →

Enter Calculation

Formula

Show calculation steps (4)
  1. Specificity (True Negative Rate)

    Specificity (True Negative Rate): Sensitivity and Specificity Calculator

    Proportion of actual negatives correctly identified

  2. Positive Predictive Value (PPV)

    Positive Predictive Value (PPV): Sensitivity and Specificity Calculator

    Proportion of positive test results that are true positives

  3. Negative Predictive Value (NPV)

    Negative Predictive Value (NPV): Sensitivity and Specificity Calculator

    Proportion of negative test results that are true negatives

  4. Accuracy

    Accuracy: Sensitivity and Specificity Calculator

    Proportion of all results that are correct

Advertisement

Results

Sensitivity (True Positive Rate)
90%
ability to correctly identify positives
Specificity (True Negative Rate) 80%
Positive Predictive Value (PPV) 81.82%
Negative Predictive Value (NPV) 88.89%
Accuracy 85%

What This Calculator Does

This tool measures the performance of a binary diagnostic test or classification model. From the four cells of a 2×2 confusion matrix — True Positives (TP), False Negatives (FN), True Negatives (TN), and False Positives (FP) — it computes sensitivity, specificity, positive and negative predictive values (PPV/NPV), and overall accuracy. These metrics are widely used in medicine, epidemiology, and machine learning.

Two by two confusion matrix showing TP, FP, FN and TN cells
A confusion matrix arranges predictions into true positives, false positives, false negatives and true negatives.

How to Use It

Enter the count of each outcome from your study or model. A "positive" usually means the condition is present (or the model predicts the positive class). TP and FP are cases the test called positive; TN and FN are cases the test called negative. Click calculate to see all five metrics as percentages.

The Formulas Explained

Sensitivity = TP / (TP + FN) tells you how well the test catches true cases — a high value means few sick patients are missed. Specificity = TN / (TN + FP) tells you how well it rules out healthy people — a high value means few false alarms. PPV = TP / (TP + FP) is the chance a positive result is real, and NPV = TN / (TN + FN) is the chance a negative result is truly negative. Accuracy = (TP + TN) / total summarizes overall correctness.

$$\text{Sensitivity} = \frac{\text{TP}}{\text{TP} + \text{FN}} \times 100\%$$

$$\text{Specificity} = \frac{\text{TN}}{\text{TN} + \text{FP}} \times 100\%$$

$$\text{PPV} = \frac{\text{TP}}{\text{TP} + \text{FP}} \times 100\%$$

$$\text{NPV} = \frac{\text{TN}}{\text{TN} + \text{FN}} \times 100\%$$

$$\text{Accuracy} = \frac{\text{TP} + \text{TN}}{\text{TP} + \text{FN} + \text{TN} + \text{FP}} \times 100\%$$

Advertisement
Diagram contrasting sensitivity from actual positives and specificity from actual negatives
Sensitivity is computed among actual positives, specificity among actual negatives.

Worked Example

Suppose a test gives TP = 90, FN = 10, TN = 80, FP = 20.

$$\text{Sensitivity} = \frac{90}{90 + 10} = 90\%$$

$$\text{Specificity} = \frac{80}{80 + 20} = 80\%$$

$$\text{PPV} = \frac{90}{90 + 20} \approx 81.82\%$$

$$\text{NPV} = \frac{80}{80 + 10} \approx 88.89\%$$

$$\text{Accuracy} = \frac{90 + 80}{200} = 85\%$$

FAQ

What is the difference between sensitivity and specificity? Sensitivity measures how well a test detects people who have the condition; specificity measures how well it correctly clears people who do not.

Why do PPV and NPV differ from sensitivity/specificity? Predictive values depend on disease prevalence in your sample, while sensitivity and specificity are intrinsic test properties.

Can a test be 100% sensitive but useless? Yes — a test that calls everyone positive is 100% sensitive but 0% specific, so both numbers matter together.

Last updated: