Accuracy Calculator
Calculate classification accuracy from true positive, true negative, false positive, and false negative counts.
Inputs
Accuracy
0.93%
Error Rate
0.07%
Total Predictions
1,000
Step by step
Total predictions: TP + TN + FP + FN
80 + 850 + 20 + 50
= 1000
Accuracy: (TP + TN) / total
(80 + 850) ÷ 1000
= 0.9300
How it works
Accuracy is the fraction of all predictions that were correct: accuracy = (TP + TN) / (TP + TN + FP + FN). It's the most intuitive classification metric, but it can be misleading on imbalanced datasets — a classifier that always predicts the majority class can score high accuracy while completely failing the minority class. For imbalanced problems, precision, recall, F1, or balanced accuracy usually give a more honest picture of performance.
Formula
accuracy = (TP + TN) / (TP + TN + FP + FN)
- TP
- True positives
- TN
- True negatives
- FP
- False positives
- FN
- False negatives
Frequently Asked Questions
When is accuracy a misleading metric?
On imbalanced datasets, a model can achieve high accuracy simply by always predicting the majority class, while providing no real predictive value for the minority class. In those cases, precision, recall, F1, or balanced accuracy are more informative.
What's a good accuracy score?
It depends entirely on the task and class balance. 95% accuracy is unremarkable on a dataset that's 95% one class, but excellent on a balanced, hard classification problem — always compare against a naive baseline.
How is accuracy different from precision?
Accuracy measures overall correctness across both classes, while precision measures correctness only among the predictions labeled positive — precision ignores true negatives entirely.