Confusion Matrix and Diagnostic Test Metrics
Enter TP, FP, FN and TN to get accuracy, sensitivity, specificity, precision, recall, F1, MCC and likelihood ratios, with confidence intervals and predictive values at any prevalence.
- Free
- No sign-up
- Works on any device
About Confusion Matrix and Diagnostic Test Metrics
Enter the four counts of a confusion matrix: true positives, false positives, false negatives and true negatives. The tool returns accuracy, sensitivity (recall), specificity, precision, negative predictive value, F1, balanced accuracy, MCC, error rates, Youden's J, likelihood ratios and the diagnostic odds ratio, with Wilson confidence intervals for the main rates. You can also enter a different prevalence to see the predictive values change. With TP 80, FP 10, FN 20 and TN 90 the sensitivity is 80 percent, the specificity 90 percent, the F1 score 0.8421 and the MCC 0.7035.
How to use Confusion Matrix and Diagnostic Test Metrics
- Enter TP, FP, FN and TN from your test or classifier.
- Optionally type the prevalence of the condition in the population you care about.
- Read the rates and ratios, the intervals and the predictive values at that prevalence.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
- Free to embed on your own website, with a ready-made code to copy.
Also known as
Frequently asked questions
What is the difference between sensitivity and precision?
Sensitivity is the share of real positives the test catches. Precision (positive predictive value) is the share of positive results that are real. The first looks across the people with the condition, the second across the positive results.
Why do predictive values change with prevalence?
When a condition is rare, even a good test produces many false positives compared with true ones, so the positive predictive value falls. Sensitivity and specificity do not depend on prevalence.
When is MCC better than accuracy?
With imbalanced classes. A classifier that always predicts the common class can have high accuracy but an MCC near 0, because MCC uses all four cells of the matrix.
Is Confusion Matrix and Diagnostic Test Metrics free?
Yes. Confusion Matrix and Diagnostic Test Metrics on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.
Can I put Confusion Matrix and Diagnostic Test Metrics on my own website?
Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.