Want a Custom tool for Yourself?

Need a Custom Tool? We build custom tools that can save hours per employee per day.

Sensitivity And Specificity Calculator

Compute sensitivity, specificity, precision, recall, and accuracy from true and false positives and negatives. Great for diagnostic tests.

Enter the Details





%


Result will appear here...


Last updated: March 3, 2026

Created by: Eon Tools Dev Team

Reviewed by: Ankit Khatiwada



What the sensitivity and specificity calculator does

Sensitivity and specificity measure how well a test tells apart those who have a condition from those who do not. This calculator takes the four outcomes of a test, the true and false positives and the true and false negatives, plus the prevalence of the condition, and returns sensitivity, specificity, predictive values, likelihood ratios, and overall accuracy.

These are the standard measures for judging a diagnostic test. Below is what each one means and why the prevalence matters as much as the test itself.

How to use it

  1. Enter the four counts: true positives, false positives, false negatives, and true negatives.
  2. Enter the prevalence of the condition as a percentage.
  3. Press Calculate for the full set of measures, or Reset to clear it.

The two core rates

Sensitivity is the true positive rate: of everyone who actually has the condition, the share the test correctly flags. A sensitive test misses few real cases, so it is good at catching what it is looking for. It answers the question, if you have the condition, how likely is the test to find it.

Specificity is the true negative rate: of everyone who does not have the condition, the share the test correctly clears. A specific test raises few false alarms. It answers the opposite question, if you do not have the condition, how likely is the test to say so. A good test needs both, but the two do not always come together.

The tradeoff between them

Sensitivity and specificity often pull against each other. Many tests rest on a threshold, and moving it to catch more true cases usually also catches more false alarms. Loosen the test to raise sensitivity and specificity tends to fall; tighten it to raise specificity and sensitivity tends to drop.

Which to favour depends on the cost of each kind of mistake. For a dangerous but treatable disease, missing a real case is worse than a false alarm, so you lean toward sensitivity. For a condition where the follow-up is risky or frightening, avoiding false alarms matters more, so you lean toward specificity. There is rarely a free lunch, and the right balance is a judgement about consequences, not just numbers.

Predictive values depend on prevalence

Here is the part that surprises people most. Sensitivity and specificity are properties of the test, but they are not what a patient actually wants to know. A patient with a positive result wants the positive predictive value: given this positive test, what is the chance I really have the condition. And that answer depends heavily on how common the condition is.

This is why the calculator asks for prevalence, and it is the same base-rate lesson that Bayes' theorem teaches. For a rare condition, even an excellent test produces mostly false alarms among its positives, simply because there are so many more healthy people to draw them from. A test with high sensitivity and specificity can still leave a positive result meaning only a small chance of disease, if the disease is rare enough. The test quality and the prevalence together decide what a result is worth.

The likelihood ratios

The calculator also reports likelihood ratios, which combine the two rates into a single measure of how much a result shifts the odds. The positive likelihood ratio says how much more likely a positive result is in someone with the condition than in someone without it, and the negative likelihood ratio does the same for a negative result.

Their appeal is that they do not depend on prevalence, so they describe the test itself in one number, while still being usable to update the odds for any particular patient. A large positive likelihood ratio means a positive result is strong evidence for the condition, and a negative likelihood ratio near zero means a negative result is strong evidence against it.

A worked example

Suppose a test gives 90 true positives, 10 false negatives, 85 true negatives, and 15 false positives. Sensitivity is 90 out of 100 = 90 percent, and specificity is 85 out of 100 = 85 percent. Both are good.

Now suppose the condition affects just 1 percent of the population. Working through the predictive value, a positive result means only about a 5.7 percent chance of actually having the condition. That is the base rate at work: despite a strong test, a positive is far more often a false alarm than a real case, because real cases are so rare. Raise the prevalence and that positive predictive value climbs sharply, which is exactly why prevalence belongs in the calculation.

Entering your values

Enter the four outcome counts as whole numbers and the prevalence as a percentage. The calculator returns sensitivity, specificity, the positive and negative likelihood ratios, the positive and negative predictive values, and overall accuracy. The predictive values reflect the prevalence you enter, so setting it to match your real setting matters.

Questions people ask

What is sensitivity?

The true positive rate: of those who have the condition, the share the test correctly identifies. High sensitivity means few real cases are missed.

What is specificity?

The true negative rate: of those without the condition, the share the test correctly clears. High specificity means few false alarms.

What is the positive predictive value?

Given a positive test, the chance the person really has the condition. Unlike sensitivity and specificity, it depends on how common the condition is.

Why does prevalence matter?

Because for a rare condition, even a good test produces mostly false alarms among its positives. Prevalence and test quality together decide what a result is worth.

References

A quick note on where the methods here come from. Test performance measures and the role of prevalence through Bayes' theorem are set out in the NIST/SEMATECH e-Handbook of Statistical Methods, the US government's public statistics reference. OpenStax Introductory Statistics is a free, widely used textbook covering conditional probability and Bayes' theorem, which underlie predictive values.

  1. NIST/SEMATECH e-Handbook of Statistical Methods (test performance and Bayes' theorem). https://www.itl.nist.gov/div898/handbook/
  2. OpenStax, Introductory Statistics (conditional probability and Bayes' theorem). https://openstax.org/details/books/introductory-statistics-2e


Ankit Khatiwada

Ankit Khatiwada is a researcher and graduate student in Computer Science at Saarland University, with strengths in statistics, data analysis, data engineering, and full stack development. His work sits at the intersection of quantitative reasoning and applied technology, making him a strong fit for tools that depend on clear numerical logic. At Eon Tools, he reviews number and statistical tools.