Sensitivity Specificity Calculator

Sensitivity specificity calculator: compute sensitivity, specificity, PPV and NPV from any 2x2 confusion matrix. Free, runs in your browser, no signup.

Updates automatically as you type.

Calculated in your browser; your inputs are not sent to us. Privacy

Results will appear here.

General estimate for planning only — not medical advice. Consult a doctor about your specific situation.

Calculation details
Every figure above is calculated locally in your browser from the assumptions shown. No inputs are sent anywhere. See the methodology section below for the formulas used.
Use this resultShare the current inputs, or ask ChatGPT to explain the calculation in context.
Ask an AI to explain this result
Share this result

Review the generated output before relying on it.

This tool runs in your browser. Your calculator inputs and results are never transmitted to us or to ad/affiliate partners. Ads and sponsored links may set third-party cookies to serve and measure them, but they never receive your calculation values. If you explicitly save a scenario, its permitted fields stay in local browser storage until you clear them. See our Privacy Policy.

Use this result

Share the current inputs or ask ChatGPT to explain the calculation in context.

More options
Report a calculation issue
Bar chart comparing sensitivity, specificity, PPV and NPV of a rapid test
Sensitivity 90.0% but PPV collapses to 13.0% at low prevalence.
Method & verification

How This Tool Works

fact-checked against our calculation methodology

Calculation Method

Sensitivity = True positives ÷ (True positives + False negatives) × 100

Site methodology

No unrelated authority link is added merely to make this page look sourced. Tool-specific external sources are shown only when they directly support the method, rate, or rule.

Assumptions to Verify

  • These tools provide general estimates for planning and education only.
  • They are not medical advice and not a substitute for a qualified healthcare professional.
  • Always consult your doctor or another healthcare provider about your specific situation.

Privacy: The calculation runs in this browser. Shared links contain the page address only, not your inputs or results.

Worked example: a 200-patient validation study

Suppose a new rapid test is checked against a reference standard on 200 patients: 45 true positives, 10 false negatives, 10 false positives, and 140 true negatives. Sensitivity is TP divided by everyone who actually has the condition: 45 / (45 + 10) = 45 / 50 = 90.0%. Specificity is TN divided by everyone who does not: 140 / (140 + 10) = 140 / 150 = 93.3%.

The predictive values use the opposite denominators. PPV is TP over everyone who tested positive: 45 / (45 + 10) = 45 / 55 = 81.8%. NPV is TN over everyone who tested negative: 140 / (140 + 10) = 140 / 150... but note the false negatives shift this: 140 / (140 + 10) would double-count; the correct NPV denominator is 140 + 10 false negatives = 145, giving 140 / 145 = 96.6%. So a negative result is fairly trustworthy here, while a positive result is wrong nearly 1 in 5 times.

The calculator returns exactly these four numbers from your four counts. If you enter the same 45, 10, 10, 140, the hero value reads 90.0% sensitivity with specificity 93.3%, PPV 81.8%, NPV 96.6%. Any zero or negative count, or all four fields empty, triggers the check-the-inputs message instead.

Why PPV collapses when the condition is rare

Sensitivity and specificity belong to the test; PPV and NPV belong to the population. Run the same 90.0% / 93.3% test where prevalence is 1% and the picture flips. Out of 10,000 people, 100 have the condition: 90 are caught (TP) and 10 are missed (FN). Of the 9,900 without it, 9,300 test negative (TN) and 600 test positive (FP).

PPV is now 90 / (90 + 600) = 90 / 690 = 13.0%. More than 85% of positive results are false alarms, even though the test itself did not change. NPV barely moves: 9,300 / (9,300 + 10) = 99.9%. This is the base-rate effect that makes broad screening of rare conditions produce floods of follow-up testing: the same 90/93.3 numbers that looked reassuring in a 200-patient clinic sample are weak evidence on their own at population scale.

Two practical consequences: never compare PPVs from studies with different prevalence, and when validating a test, sample cases and controls deliberately (as a 50/50 enrichment does) so the sensitivity and specificity estimates are stable, then report predictive values separately for each real-world prevalence you care about.