Ad Space
Statistics Calculators

Confusion Matrix Calculator

Calculate accuracy, precision, recall, specificity and F1 score for a classification model from its confusion matrix counts.

Accuracy
Precision
Recall (sensitivity)
Specificity
F1 score
Ad Space — 300×250

About the Confusion Matrix Calculator

A confusion matrix summarizes how well a classification model's predictions match reality, broken into true positives, false positives, true negatives and false negatives. From these four counts, several standard performance metrics can be derived.

Formula: Accuracy = (TP + TN) ÷ Total · Precision = TP ÷ (TP + FP) · Recall = TP ÷ (TP + FN) · F1 = 2 × (Precision × Recall) ÷ (Precision + Recall)

Accuracy can be misleading on imbalanced datasets, which is why precision, recall and the F1 score (their harmonic mean) are commonly reported alongside it to give a fuller picture of a classifier's strengths and weaknesses.

Ad Space