Specificity and Sensitivity Calculator

Enter test counts and compare diagnostic performance with detailed measures. Check rates before making decisions. Download simple reports for records, audits, and reviews quickly.

Calculator

Example Data Table

Scenario True Positive False Negative True Negative False Positive Sensitivity Specificity Accuracy
Screening Test A 80 20 90 10 80% 90% 85%
Model Review B 45 5 70 30 90% 70% 76.67%
Audit Sample C 25 15 140 20 62.5% 87.5% 82.5%

Formula Used

Sensitivity = TP / (TP + FN)

Specificity = TN / (TN + FP)

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

Positive Predictive Value = TP / (TP + FP)

Negative Predictive Value = TN / (TN + FN)

False Positive Rate = FP / (FP + TN)

False Negative Rate = FN / (FN + TP)

Positive Likelihood Ratio = Sensitivity / (1 - Specificity)

Negative Likelihood Ratio = (1 - Sensitivity) / Specificity

Youden Index = Sensitivity + Specificity - 1

F1 Score = 2TP / (2TP + FP + FN)

MCC = (TP × TN - FP × FN) / √((TP + FP)(TP + FN)(TN + FP)(TN + FN))

How to Use This Calculator

Enter the four confusion matrix values. Use true positive, false negative, true negative, and false positive counts.

Add a population prevalence value when you want adjusted predictive values. Leave it blank to use sample prevalence.

Select decimal places for the report. Press Calculate to show results above the form.

Use Download CSV for spreadsheet review. Use Download PDF for a simple printable report.

Understanding Diagnostic Test Quality

Specificity and sensitivity describe how well a test separates two groups. Sensitivity focuses on people or items that truly have the condition. A sensitive test finds most positives. Specificity focuses on people or items that truly do not have the condition. A specific test avoids many false alarms.

Why The Matrix Matters

The four count inputs form a confusion matrix. True positives are correct positive findings. False negatives are missed cases. True negatives are correct negative findings. False positives are incorrect positive findings. These values make every rate transparent. They also help teams see where a process fails. A test may look accurate in one sample yet perform poorly when the condition is rare.

Key Measures To Review

Sensitivity is useful when missing a positive case is costly. Screening programs often prefer high sensitivity. Specificity is important when false positives cause expense, anxiety, or extra checks. Positive predictive value explains how often positive results are correct. Negative predictive value explains how often negative results are correct. Likelihood ratios help compare test results across different prevalence levels. The Youden index summarizes overall separation. Balanced accuracy is helpful when groups are uneven.

Using Results Responsibly

No single metric tells the whole story. Always compare the result with the purpose of the test. A high sensitivity score does not guarantee strong positive predictions. A high specificity score does not remove all risk. Prevalence changes the meaning of positive and negative results. This calculator includes sample prevalence and optional population prevalence. That helps users estimate predictive values in a target setting.

Practical Interpretation Tips

Start by checking the raw counts. Small samples can make rates unstable. Then review sensitivity and specificity together. Look at false positive and false negative rates. Consider the cost of each error. Use accuracy only when positive and negative groups are balanced. Export the report when you need records for audits, teaching, or model review. Keep notes about data source, test threshold, and inclusion rules. These details make later comparisons fair. Clear inputs create clearer conclusions. When results guide decisions, document assumptions carefully. Repeat calculations after new data arrives. Trends often reveal improvement better than one isolated score alone. Review thresholds before changing an operating rule.

FAQs

What is sensitivity?

Sensitivity measures how many actual positive cases are correctly found. It uses true positives divided by true positives plus false negatives.

What is specificity?

Specificity measures how many actual negative cases are correctly rejected. It uses true negatives divided by true negatives plus false positives.

Why are false negatives important?

False negatives are missed positive cases. They matter when missing a case creates risk, delay, or poor decisions.

Why are false positives important?

False positives are incorrect positive results. They can increase cost, extra testing, manual review, or unnecessary concern.

Is accuracy enough for test review?

No. Accuracy can mislead when positive and negative groups are uneven. Review sensitivity, specificity, predictive values, and error rates together.

What is positive predictive value?

Positive predictive value shows how often predicted positive results are truly positive. It depends on test quality and prevalence.

What is negative predictive value?

Negative predictive value shows how often predicted negative results are truly negative. It often changes when prevalence changes.

Can I export the result?

Yes. Use the CSV button for spreadsheet work. Use the PDF button for a simple report or printable record.

Related Calculators

Paver Sand Bedding Calculator (depth-based)Paver Edge Restraint Length & Cost CalculatorPaver Sealer Quantity & Cost CalculatorExcavation Hauling Loads Calculator (truck loads)Soil Disposal Fee CalculatorSite Leveling Cost CalculatorCompaction Passes Time & Cost CalculatorPlate Compactor Rental Cost CalculatorGravel Volume Calculator (yards/tons)Gravel Weight Calculator (by material type)

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.