Intermediate

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.
Correctly predicted positives
Correctly predicted negatives
Type I error — predicted positive, actually negative
Type II error — predicted negative, actually positive
Accuracy
87,50

% of all predictions that were correct: (TP + TN) / Total

Precision (PPV)
89,47 %
Recall (Sensitivity / TPR)
85 %
F1 Score
87,18 %
Specificity (TNR)
90 %
Neg. Predictive Value (NPV)
85,71 %
Balanced Accuracy
87,5 %
Total predictions
200

87,5 %

Accuracy

True Positives (TP)

42.5%

True Negatives (TN)

45%

False Positives (FP)

5%

False Negatives (FN)

7.5%

Step by step
  1. 1

    Total predictions

    85 + 90 + 10 + 15 = 200
  2. 2

    Correct predictions (TP + TN)

    85 + 90 = 175
  3. 3

    Accuracy

    (175 ÷ 200) × 100 = 87,50
    Fraction of all predictions that were correct, expressed as a percentage.
Rezultati so ocene zgolj za splošno obveščanje in niso strokovni nasvet — pomembne rezultate vedno samostojno preverite, preden se nanje zanesete. Preberite celotno izjavo o omejitvi odgovornosti.
Hiter odgovor

Kako deluje ta kalkulator?

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.

Formula
Accuracy = (TP + TN) / (TP + TN + FP + FN) • Precision = TP / (TP + FP) • Recall = TP / (TP + FN) • F1 = 2 × Precision × Recall / (Precision + Recall)
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.

Pogosta vprašanja

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.

Znano tudi kot

confusion matrix calculator
classification accuracy calculator
precision recall f1 calculator
model evaluation metrics
sensitivity specificity calculator
true positive false positive calculator
binary classifier metrics
ml accuracy calculator

APA

TG we-Calculate Editorial Team. (2026). Accuracy Calculator — Confusion Matrix Metrics [Online calculator]. TG we-Calculate. https://we-calculate.com/sl/calculator/accuracy-calculator

Chicago

TG we-Calculate Editorial Team. "Accuracy Calculator — Confusion Matrix Metrics." TG we-Calculate. 2026. https://we-calculate.com/sl/calculator/accuracy-calculator.

IEEE

TG we-Calculate Editorial Team, "Accuracy Calculator — Confusion Matrix Metrics," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/sl/calculator/accuracy-calculator

BibTeX

@misc{wecalculate_accuracy_calculator, title = {Accuracy Calculator — Confusion Matrix Metrics}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/sl/calculator/accuracy-calculator}}, year = {2026}, note = {TG we-Calculate} }

Vam je ta kalkulator pomagal?