Confusion matrix calculator
Paste actual labels and predicted labels to build a binary confusion matrix. The calculator counts TP, FP, FN, and TN, then reports accuracy, precision, recall, specificity, and F1.
1. Add paired labels
Metrics update as you type.
2. Read the matrix
| Actual positive | Actual negative | |
|---|---|---|
| Predicted positive | 0TP | 0FP |
| Predicted negative | 0FN | 0TN |
Correct overall
Positive predictions correct
Actual positives found
Actual negatives found
Precision/recall balance
How to use this confusion matrix calculator
Each position in the two lists represents one evaluated case. The calculator treats “positive” as the class of interest; swap the meaning of the class if your application’s positive case is different. For direct TP, FP, FN, and TN counts without labels, use the classification metrics calculator.
What the four cells mean
A true positive is a positive case correctly predicted as positive. A false positive is a negative case incorrectly flagged. A false negative is a positive case missed by the model. A true negative is a negative case correctly rejected.
Read the confusion matrix guide for a worked table, threshold trade-offs, class imbalance, and common reporting mistakes.