Classification Accuracy Calculator
Calculate accuracy, precision, recall, specificity, and F1 score from a binary confusion matrix.
About classification accuracy
Accuracy calculation examples
| Confusion matrix | Key results | Interpretation |
|---|---|---|
| TP 80, FP 20, TN 90, FN 10 | Accuracy 85.00%; F1 84.21% | Strong, fairly balanced performance |
| TP 50, FP 0, TN 50, FN 0 | All metrics 100.00% | Perfect classification on this sample |
| TP 10, FP 5, TN 180, FN 5 | Accuracy 95.00%; Recall 66.67% | High accuracy hides missed positives |
How to calculate classification metrics
- Count the true positives and false positives in the evaluated predictions.
- Count the true negatives and false negatives from the same dataset.
- Enter all four non-negative counts in the matching fields.
- Select Calculate Metrics and compare accuracy with precision, recall, specificity, and F1 score.
Frequently asked questions
What is a good classification accuracy?
A good accuracy depends on class balance, baseline performance, and the cost of each error. Compare it with a simple baseline and inspect the other metrics before judging the model.
Why can accuracy be misleading?
Accuracy weights every correct prediction equally and can be dominated by a large majority class. A model may have high accuracy while detecting very few minority-class cases.
What is the difference between precision and recall?
Precision asks how many predicted positives were correct. Recall asks how many actual positives the classifier successfully found.
When should I use the F1 score?
Use F1 when both false positives and false negatives matter and you want one balance-oriented measure. It does not account for true negatives, so also review accuracy and specificity.
Can I enter percentages instead of counts?
Use counts whenever possible because all cells must share the same denominator. Proportional values only work if they are consistently scaled and represent the complete confusion matrix.