Sensitivity & Specificity Calculator
Find a test's sensitivity and specificity.
Result
How it is calculated
You enter the four cells of a 2×2 table of counts: TP (true positives), FN (false negatives), TN (true negatives) and FP (false positives). The tool then calculates sensitivity = TP ÷ (TP + FN), specificity = TN ÷ (TN + FP) and accuracy = (TP + TN) ÷ (TP + FN + TN + FP), each multiplied by 100 and shown as a percentage with two decimals. The inputs are numbers of people or cases, not percentages. There is no result if a count is negative, if there are no actual positives (TP + FN = 0) or if there are no actual negatives (TN + FP = 0). The tool does not give predictive values; those depend on how common the condition is in the group tested.
Worked example
A screening test is checked on 300 people: 100 have the condition and 200 do not. The test flags 90 of the 100 (TP = 90, FN = 10) and correctly clears 160 of the 200 (TN = 160, FP = 40). Sensitivity = 90 ÷ 100 = 90.00%. Specificity = 160 ÷ 200 = 80.00%. Accuracy = (90 + 160) ÷ 300 = 83.33%. So the test misses 1 in 10 real cases and wrongly flags 1 in 5 healthy people.
Common mistakes
- Putting the cells in the wrong places. Swapping FN and FP is the most common error, and it turns a test that misses cases into one that raises false alarms.
- Typing percentages instead of counts. If you type 90, 10, 80 and 20 from a published sensitivity and specificity, the tool treats them as 200 people split evenly, so the accuracy is wrong whenever the real groups differ in size.
- Reading accuracy as the whole story. When the condition is rare, a test can have high accuracy and still miss most real cases, so look at sensitivity and specificity separately.
- Assuming sensitivity tells you the chance that a positive result is correct. That is the positive predictive value, which this tool does not calculate and which depends on prevalence.
About this calculator
This calculator finds a diagnostic test's sensitivity (the true positive rate, TP/(TP+FN) — the fraction of actually-positive cases the test correctly flags), specificity (the true negative rate, TN/(TN+FP) — the fraction of actually-negative cases it correctly clears), and overall accuracy from a 2×2 confusion matrix of true and predicted outcomes. High sensitivity means few real cases are missed; high specificity means few healthy people are falsely flagged — and the two typically trade off against each other depending on where a test's decision threshold is set.
Clinicians and epidemiologists use these figures to judge whether a screening test is reliable enough for a given disease's prevalence, medical device and lab-test manufacturers report them to regulators as part of validation, and public-health officials use them when deciding whether to roll out a mass-screening program. Data scientists building machine-learning classifiers use the exact same math — under the names recall and true-negative rate — to evaluate model performance, and biostatistics students use this calculator to work through confusion-matrix problems.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)