Sensitivity and Specificity Calculator

Sensitivity and Specificity Calculator

Enter true positives, false negatives, true negatives, and false positives to calculate sensitivity, specificity, likelihood ratios, accuracy, predictive values, and reporting-ready diagnostic checks.

🎯Diagnostic Presets

📝Confusion Matrix Inputs

Name the disease, defect, event, or target class.

Positive test among truly positive cases.

Negative test among truly positive cases.

Negative test among truly negative cases.

Positive test among truly negative cases.

Sensitivity 0% TP / (TP + FN)
Specificity 0% TN / (TN + FP)
Likelihood ratios 0 / 0 LR+ and LR-
Accuracy 0% (TP + TN) / n

🧮Diagnostic Summary Grid

-Total N
-Prevalence
-Positive Tests
-Negative Tests
-PPV
-NPV
-False Positive Rate
-False Negative Rate

📊Current 2x2 Diagnostic Table

📐Metric Formula Table

Likelihood Ratio Interpretation

MetricBandEvidence StrengthTypical MeaningCaution
LR+1.0NonePositive result does not change oddsCheck coding and reference standard
LR+2 to 5Small to usefulPositive result modestly raises probabilityBase rate still matters
LR+5 to 10ModeratePositive result is meaningfully persuasiveVerify sample representativeness
LR+10+StrongPositive result can be good for rule-in useWide intervals need caution
LR-0.5 to 1WeakNegative result leaves much uncertaintyMisses may remain frequent
LR-0.2 to 0.5ModerateNegative result lowers probabilityUse with clinical context
LR-0.1 to 0.2StrongNegative result can support rule-out useNeeds reliable sensitivity
LR-Below 0.1Very strongNegative result sharply lowers probabilityConfirm external validation

🔍Preset Benchmark Table

PresetTPFNTNFPMain Read
Rare disease screen92885545Good sensitivity, PPV limited by low prevalence
Emergency rule-out1464690160Excellent sensitivity, many false alarms
High specificity rule-in1084282822Positive results carry stronger rule-in evidence
Rapid antigen audit2406065050Specificity is high, sensitivity is moderate
AI triage model410901280220Balanced model with visible false-positive load
Lab assay validation1881277624Strong sensitivity and specificity together
Factory defect sensor6416184080Low prevalence makes PPV sensitive to FP count
Veterinary herd test21030147090Useful screening pattern for group decisions
Screening panel review520803300300Large sample shows stable accuracy estimates
Small pilot study1876213Small denominators need interval reporting

Full Formula Breakdown

Sensitivitysensitivity = TP / (TP + FN). It is the share of truly positive cases the test correctly marks positive.
Specificityspecificity = TN / (TN + FP). It is the share of truly negative cases the test correctly marks negative.
LR+LR+ = sensitivity / (1 - specificity). Higher values make a positive test result more persuasive.
LR-LR- = (1 - sensitivity) / specificity. Lower values make a negative test result more persuasive.
Accuracyaccuracy = (TP + TN) / n, where n = TP + FN + TN + FP.
PPVpositive predictive value = TP / (TP + FP). It depends on prevalence in the tested sample.
NPVnegative predictive value = TN / (TN + FN). It also shifts when the tested population changes.
Confidence intervalsThis calculator shows simple Wald intervals for proportions so small samples can be flagged quickly.

💡Diagnostic Reporting Tips

Use raw counts: Enter the four cells from the same validation sample. Mixing percentages from different studies breaks the formulas.
Separate intrinsic and sample-dependent metrics: Sensitivity and specificity describe the test against the reference standard; PPV and NPV move with prevalence.
Read LR+ and LR- together: A test can be useful for ruling in, ruling out, both, or neither depending on which likelihood ratio is strong.
Report uncertainty: Very small TP + FN or TN + FP denominators can make impressive percentages look more precise than they are.

Educational calculation only. For clinical, regulatory, or operational decisions, validate the reference standard, sampling plan, and intended-use population.

Each diagnostic test you perform is actualy a guessing game, but on partial information. Patient may or may not be ill. The test may or may not be correct. Because of this, the diagnosis you make can affect everything. The problem is that there is this trade off between false alarms and capturing all cases. And no test do that right. In other words, thats the nature of clinical evaluation.

And so to cut through that confusion, you reach for a 2×2 matrix. Yes, its boring. But if it sounds unfamiliar, it’s because it’s foundation of evidence-based medicine.

Understanding Diagnostic Tests

The idea is that you count four things. You count true positives (the patients whose case you called correctly) and false positives (the healthy people you alarmed needlessy). You also count true negatives (the healthy people you cleared correctly) and false negatives (the dangerous misses). Plug the raw number into the calculator above, and math strips out guesswork.

Sensitivity measures how well your test find the disease. Sensitivity is the proportion of actual cases that test positive. If sensitivity is high, this will rarely fails to find anyone with disease, which is important if missing someone would be deadly: you’d want to cast a wide net.

The opposite is what we mean by specificity. How well does the test identifies healthy people? High specificity give you few false alarms. This is important if taking action would be risky/expensive; you want to be sure.

Here’s the trick: it can’t be optimized in both directions simultaneously. If you move the threshold up to capture more of those sick people, then by definition youll also capture more of those who are just healthy. And that’s where people misunderstand; they want a perfect test and there is no such things. It says so right on the page in the reference table, which spells out how different presets manages the trade-offs between the two.

For example, if you’re looking for a screening tool for a rare disease, you want to prioritize sensitivity. If you’re doing a confirmatory test for something that could have serious treatments, you want to prioritize specificity.

Test results don’t directly answer whether a patient has a disease. Instead, they shift our confidence one way or another. Likelihood ratios provides a sharper lens by showing us how much a test result changes things.

If a positive likelihood ratio is high, then a positive result goes a long way toward confirming the diagnosis. If a negative likelihood ratio is low, then a negative result virtually excludes it.

Unlike predictive values, which depend on prevalence of the disease in your particular clinical setting, these likelihood ratios relies solely on the test itself and thus tend to be more stable.

But then there’s prevalence. When something is rare, positive predictive value plummets, even your most specific test will spit out a lot of false positives when nearly everyone tested has no reason to be sick. This is what makes it so that a positive screen for a rare disease is hardly ever conclusive; it only indicates you should of look further.

With negative predictive value, it’s the reverse. The more rare the condition, the higher the negative predictive value. This means a negative test for a rare condition give you very good reassurance.

Noise comes from small samples. If you shrink the size of the denominator, then the confidence interval widens, and the smaller your study (e.g., a 95% sensitive test on 10 patients) become, the less useful it is. It could be anything from 50% to 100%. So here are those intervals that let you look at how certain you should be. Look at their width. The narrower, the better. The bigger, wait until there’s more.

Diagnostics are a mess in the real world. The reference standard isn’t perfect. Sampling bias means that tests will skew based off where they’re done. A test well-validated at a specialized center might fail miserably when used in your primary care clinic (because numbers was based on ideal conditions).

Use the metrics for guidance… Don’t follow them like gospel. You need to decide how much the real world differ from the model.

Finally, a test is only a piece of evidence. A test never provides absolute truth; a test only updates your prior belief. If you understand sensitivity and specificity, you will be able to weigh the evidence correctly. And you will cease thinking in terms of pass/fail. You will begin to see probabilities change, moment by moment, and that’s when the true diagnosis occurs.

The numbers do not say, ‘Do this.’ The numbers say only, ‘This is what you know.’

Sensitivity and Specificity Calculator