Diagnostic accuracy calculator
Compute sensitivity, specificity, predictive values, likelihood ratios and other accuracy metrics with confidence intervals from a confusion matrix or labelled rows. It describes test performance on your data and gives no clinical advice.
Runs locally in your browser; nothing is uploaded. Counts are whole numbers from 0 to 2,500,000 with at least one actual positive and one actual negative. Labelled CSV uses the headers actual and predicted, no blank cells and exactly two labels that match exactly, including capital letters and spaces, up to 10,000 rows and 1,000,000 characters. Declared prevalence is strictly between 0 and 1. Downloads: a JSON report plus CSV metrics and confusion tables. Use the fields for counts, or choose Labelled CSV rows to paste data. Up to 1,000,000 characters. Review the settings before running.
Your result
How to use Diagnostic accuracy calculator
- Enter the four confusion counts, or switch to labelled CSV rows with actual and predicted columns.
- Optionally enter a declared prevalence to see predictive values for another population.
- Choose Wilson or Clopper-Pearson intervals and the confidence level.
- Calculate and download the JSON report or the CSV metrics table.
Useful next steps
What is computed
Sensitivity, specificity, PPV, NPV, accuracy and sample prevalence are proportions with Wilson score intervals (Wilson 1927, JASA 22:209) or Clopper-Pearson exact intervals (Clopper and Pearson 1934, Biometrika 26:404). Likelihood ratios use log intervals (Simel, Samsa and Matchar 1991, J Clin Epidemiol 44:763). Balanced accuracy, F1, Youden J, the diagnostic odds ratio and the Matthews correlation (Matthews 1975) are point estimates.
Prevalence changes predictive values
PPV and NPV from the table use the sample prevalence. If you declare a prevalence, the tool also reports predictive values from Bayes' rule with your sensitivity and specificity, which is how a test behaves where the condition is more or less common. No interval is given for those adjusted values.
Limits
A ratio with a zero denominator is reported as not defined. A likelihood ratio interval is also not defined when the ratio is 0, or when sensitivity and specificity are both 0 or 1 (its log standard error is then zero). Results describe the supplied cases only; they are not clinical advice and do not interpret any patient's result.