Confusion Matrix & Evaluation Metrics Calculator

Read the Theory Guide →
Pro-Tip: Type numbers directly into the 2x2 grid below. Watch how increasing False Positives destroys Precision, while increasing False Negatives destroys Recall., then verify it against the manual steps in theTheory Page.
Predicted Positive
Predicted Negative
Actual Positive
Actual Negative
Accuracy
85.0%
Precision
66.7%
Recall
80.0%
F1 Score
72.7%

Calculation Breakdown

1

Accuracy

Out of all predictions, how many were perfectly correct?

85.0%
Formula String
20+6520+65+10+5\frac{20 + 65}{20 + 65 + 10 + 5}
Execution
85100=0.850\frac{85}{100} = 0.850
2

Precision

When the AI predicted 'Yes', how often was it actually right?

66.7%
Formula String
2020+10\frac{20}{20 + 10}
Execution
2030=0.667\frac{20}{30} = 0.667
3

Recall (Sensitivity)

Out of all the actual 'Yes' cases, how many did the AI successfully find?

80.0%
Formula String
2020+5\frac{20}{20 + 5}
Execution
2025=0.800\frac{20}{25} = 0.800
4

F1 Score

The harmonic mean. It forces a balance between Precision and Recall.

72.7%
Formula String
2×0.667×0.8000.667+0.8002 \times \frac{0.667 \times 0.800}{0.667 + 0.800}
Execution
2×0.5331.467=0.7272 \times \frac{0.533}{1.467} = 0.727