Skip to content
LoveToCalc

Sensitivity and specificity calculator

A test's four counts in, every rate it can be judged by out — with a 95% interval around each proportion.

Your numbers

Start from

People with the condition whose test was positive. The table opens on an example of 1 000 people, not on a finding about any test.

People without the condition whose test was positive.

People with the condition whose test was negative.

People without the condition whose test was negative.

Result

Sensitivity

90%

Sensitivity, 95 % interval from
82.6%
Sensitivity, 95 % interval to
94.5%
Specificity
90%
Specificity, 95 % interval from
87.9%
Specificity, 95 % interval to
91.8%
Positive predictive value
50%
Positive predictive value, 95 % interval from
42.8%
Positive predictive value, 95 % interval to
57.2%
Negative predictive value
98.8%
Negative predictive value, 95 % interval from
97.8%
Negative predictive value, 95 % interval to
99.3%
Prevalence in the table
10%
Accuracy
90%
Positive likelihood ratio (LR+)
9
Negative likelihood ratio (LR−)
0.111
Relative risk (positive against negative test)
41
Diagnostic odds ratio
81

The test finds 90% of the people who have the condition and clears 90% of those who do not. A positive result is right 50% of the time, and a negative one 98.8%.

Sensitivity, specificity and accuracy are counts divided by a row or column of the table; the intervals are 95 % Wilson score intervals (Wilson 1927; recommended for proportions by Newcombe 1998). The predictive values depend on how common the condition is in the people tested, so a table from a study that picked its cases and controls separately does not give the predictive value for a general population: use the prevalence mode for that. A dash means the figure is not defined for this table, for example a ratio with an empty cell. The relative risk compares the chance of the condition after a positive test with the chance after a negative one. A result is only as good as the reference standard that sorted people into with and without the condition. This is not medical advice.

How to use it

What each figure is

Condition present Condition absent
Test positive TP FP
Test negative FN TN

The intervals

Each interval is a Wilson score interval at 95% (z = 1.96). It stays inside 0 to 100% and does not collapse at 0 or 100%, which the familiar p ± 1.96·√(p(1 − p)/n) does. Sources: E. B. Wilson, Journal of the American Statistical Association 22 (1927); R. G. Newcombe, Statistics in Medicine 17 (1998).

Example. Of 1,000 people, 100 have the condition and the test finds 90 of them; of the 900 without it, the test wrongly flags 90. Sensitivity 90%, specificity 90%, but only 90 of the 180 positives are real: the positive predictive value is 50%.

Last reviewed October 20, 2026 ·How pages are reviewed

The formula behind this

All math calculators

Put this calculator on your site

Copy the code into your page where the calculator should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.