Loading ModelMetric Lab
Classification evaluation

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.

Free · no sign-in · updates instantly

1. Add paired labels

Accepted: positive/negative, yes/no, true/false, or 1/0
Keep the same order and number of labels
Try an example:

Metrics update as you type.

2. Read the matrix

Actual positiveActual negative
Predicted positive0TP0FP
Predicted negative0FN0TN
Accuracy0%

Correct overall

Precision0%

Positive predictions correct

Recall0%

Actual positives found

Specificity0%

Actual negatives found

F1 score0%

Precision/recall balance

Quick read: enter labels to see the model’s error profile.

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.

precision = TP / (TP + FP) recall = TP / (TP + FN) specificity = TN / (TN + FP) accuracy = (TP + TN) / (TP + FP + FN + TN)

Read the confusion matrix guide for a worked table, threshold trade-offs, class imbalance, and common reporting mistakes.