Accuracy Calculator — Confusion Matrix Metrics
Evaluate any binary classifier by entering the four cells of its confusion matrix — True Positives, True Negatives, False Positives and False Negatives — to get accuracy, precision, recall, F1 score, specificity, and NPV in one place.
% of all predictions that were correct: (TP + TN) / Total
87,5 %
AccuracyTrue Positives (TP)
42.5%
True Negatives (TN)
45%
False Positives (FP)
5%
False Negatives (FN)
7.5%
- 1
Total predictions
85 + 90 + 10 + 15 = 200 - 2
Correct predictions (TP + TN)
85 + 90 = 175 - 3
Accuracy
(175 ÷ 200) × 100 = 87,50Fraction of all predictions that were correct, expressed as a percentage.
¿Cómo funciona esta calculadora?
From a confusion matrix, Accuracy = (TP+TN)/Total; Precision = TP/(TP+FP); Recall = TP/(TP+FN); F1 = 2×P×R/(P+R); Specificity = TN/(TN+FP). Accuracy alone is misleading on imbalanced data — use F1 or Balanced Accuracy when classes are skewed.
Fórmula
How this is calculated
A confusion matrix breaks a binary classifier's predictions into four cells: True Positives (TP, correctly predicted positives), True Negatives (TN, correctly predicted negatives), False Positives (FP, predicted positive but actually negative — Type I error), and False Negatives (FN, predicted negative but actually positive — Type II error).
Accuracy is the simplest metric: the fraction of all predictions that are correct, (TP + TN) / total. It is intuitive but misleading on imbalanced datasets — a model that always predicts the majority class can achieve high accuracy while providing no real discriminative power. Precision (TP / (TP + FP)) measures how trustworthy positive predictions are; Recall or Sensitivity (TP / (TP + FN)) measures how many actual positives are caught; and the F1 score is their harmonic mean, balancing the two. Specificity (TN / (TN + FP)) is the recall for the negative class. Balanced Accuracy averages Recall and Specificity to handle imbalanced classes.
All metrics are dimensionless fractions between 0 and 1 (shown as percentages here). "Perfect" values depend on the application — in medical screening, high recall matters most to avoid missing a disease, while in spam filtering, high precision matters most to avoid flagging legitimate mail.
Preguntas frecuentes
Accuracy is misleading when classes are imbalanced. If 95% of samples are negative, a classifier that always predicts "negative" achieves 95% accuracy while identifying zero true positives. In such cases, use Balanced Accuracy, F1 Score, or the area under the ROC curve (AUC) instead.
Optimise for Recall (Sensitivity) when the cost of missing a positive is high — e.g. disease screening, fraud detection, or safety systems where false negatives are dangerous. Optimise for Precision when false positives are costly — e.g. spam filtering (flagging good emails), or recommendation systems where irrelevant results harm user trust.
The F1 score is the harmonic mean of Precision and Recall: 2 × P × R / (P + R). It penalises extreme imbalances between the two — a model with high precision but near-zero recall (or vice versa) will score poorly. F1 is a good single-number summary when you care equally about missing positives and making false alarms, and when classes are unequal in size.
También conocido como
TG we-Calculate Editorial Team. (2026). Accuracy Calculator — Confusion Matrix Metrics [Online calculator]. TG we-Calculate. https://we-calculate.com/es/calculator/accuracy-calculator
TG we-Calculate Editorial Team. "Accuracy Calculator — Confusion Matrix Metrics." TG we-Calculate. 2026. https://we-calculate.com/es/calculator/accuracy-calculator.
TG we-Calculate Editorial Team, "Accuracy Calculator — Confusion Matrix Metrics," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/es/calculator/accuracy-calculator
@misc{wecalculate_accuracy_calculator, title = {Accuracy Calculator — Confusion Matrix Metrics}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/es/calculator/accuracy-calculator}}, year = {2026}, note = {TG we-Calculate} }
¿Te ayudó esta calculadora?
