Advanced Sensitivity and Specificity Calculator

Measure test performance with ratios, rates, and visuals. Export results, compare scenarios, and understand formulas. Build confidence using accurate diagnostic measures every single time.

Calculator Form

Enter confusion matrix values

Large screens use 3 columns, smaller screens use 2, and mobile uses 1.

Reset

Example data table

Use this sample confusion matrix to test the calculator quickly.

Scenario TP FP TN FN Sensitivity Specificity Accuracy Precision F1 Score
Example screening test 82 18 146 24 77.36% 89.02% 84.44% 82.00% 79.61%

Formulas used

  • Sensitivity: TP / (TP + FN)
  • Specificity: TN / (TN + FP)
  • Accuracy: (TP + TN) / (TP + FP + TN + FN)
  • Precision: TP / (TP + FP)
  • Negative Predictive Value: TN / (TN + FN)
  • F1 Score: 2TP / (2TP + FP + FN)
  • Prevalence: (TP + FN) / Total
  • Balanced Accuracy: (Sensitivity + Specificity) / 2
  • False Positive Rate: FP / (FP + TN)
  • False Negative Rate: FN / (FN + TP)
  • LR+: Sensitivity / (1 - Specificity)
  • LR-: (1 - Sensitivity) / Specificity
  • Diagnostic Odds Ratio: LR+ / LR-
  • Youden Index: Sensitivity + Specificity - 1
  • MCC: ((TP×TN) - (FP×FN)) / √((TP+FP)(TP+FN)(TN+FP)(TN+FN))
  • Confidence Intervals: Wilson score interval for sensitivity and specificity

How to use this calculator

  1. Enter true positives, false positives, true negatives, and false negatives.
  2. Select a confidence level for interval estimates.
  3. Choose the number of decimal places you want displayed.
  4. Click Calculate Now to show results above the form.
  5. Review the KPI cards, detailed table, bar chart, and confusion matrix heatmap.
  6. Download the output as CSV or PDF for reports or documentation.
  7. Use the reset button to test another scenario instantly.

Frequently asked questions

1) What is the difference between sensitivity and specificity?

Sensitivity measures how well a test finds real positives. Specificity measures how well it rejects real negatives. One focuses on missed cases, while the other focuses on false alarms.

2) When should I prioritize sensitivity?

Prioritize sensitivity when missing a true positive is costly or dangerous. Screening tests often aim for high sensitivity so fewer real cases are overlooked during early detection.

3) When should I prioritize specificity?

Prioritize specificity when false positives create heavy costs, anxiety, or unnecessary follow up. Confirmatory tests usually seek strong specificity before decisions or treatments are finalized.

4) Why do predictive values change with prevalence?

Predictive values depend on how common the condition is in the tested group. As prevalence rises, positive predictive value usually improves, while negative predictive value often declines.

5) What happens if a denominator becomes zero?

The calculator marks that metric as undefined. This happens when required counts for a formula do not exist, such as no actual positives or no predicted positives.

6) Why are likelihood ratios useful?

Likelihood ratios show how much a result shifts belief in a condition. They combine sensitivity and specificity into measures that support evidence based interpretation across populations.

7) Is accuracy enough by itself?

No. Accuracy can look impressive when classes are imbalanced. Sensitivity, specificity, predictive values, and MCC often provide a more honest view of test performance.

8) Why is MCC included in this calculator?

MCC is useful because it considers all four confusion matrix cells together. It remains informative when classes are uneven and helps compare models more fairly.

Related Calculators

normal distribution percentile calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.