Classification Accuracy Calculator

Evaluate binary and multiclass predictions, compare accuracy metrics, inspect confusion matrices, and export clear machine learning performance reports with guided calculation steps and insights.

Choose a calculation mode

Use counts, labels, a multiclass matrix, or ranked predictions.
Client-side calculation

Binary classification inputs

Positive class metrics included

Correct and total predictions

Actual and predicted labels

Separate labels with commas, spaces, tabs, or new lines.
Example: cat, cat, dog, dog
Label counts must match actual labels.
Weights must be nonnegative and match sample count.
CSV columns may be named actual, predicted, and weight. A header row is recommended.
Enter comma-separated names.
Rows represent actual classes. Columns represent predicted classes.

Ranked prediction inputs

Enter one actual label per line.
Each line contains highest-to-lowest ranked labels.

%

Formula used

Accuracy = Correct predictions ÷ Total predictions
Binary accuracy = (TP + TN) ÷ (TP + TN + FP + FN)
Balanced accuracy = Mean recall across all classes

How to use this calculator

  1. Select the input mode matching your available evaluation data.
  2. Enter counts, labels, matrix values, or ranked predictions.
  3. Choose decimal precision and an interpretation threshold.
  4. Calculate, inspect the metrics, then export your report.
Accuracy may mislead when one class dominates the dataset. Review recall, F1 score, balanced accuracy, and class support before judging model quality.

Example data

Scenario Input Expected accuracy Useful companion metric
Binary classifier TP 82, TN 96, FP 8, FN 14 89.00% F1 score
Simple count 178 correct from 200 89.00% Error rate
Top-3 ranking Four actual labels appear within top three 80.00% Top-1 accuracy

Understanding the results

Accuracy and error rate

Accuracy measures the fraction of predictions classified correctly. Error rate measures the fraction classified incorrectly. Their values always add to one.

Balanced accuracy

Balanced accuracy averages recall across classes. It reduces majority-class dominance in evaluation. Compare it with regular accuracy carefully.

Precision, recall, and F1

Precision evaluates positive prediction reliability. Recall evaluates positive case coverage. F1 combines both using their harmonic mean.

Kappa and MCC

Kappa adjusts agreement for chance expectations. MCC summarizes confusion-matrix quality symmetrically. Both help when classes are uneven.

Frequently asked questions

What is classification accuracy?

Classification accuracy is the proportion of correct predictions. It ranges from zero to one. Percentage accuracy multiplies that value by one hundred.

Can accuracy exceed one hundred percent?

No valid accuracy value exceeds one hundred percent. Such a result indicates invalid counts. Check totals and negative inputs carefully.

Why can high accuracy be misleading?

A dominant class can inflate overall accuracy. Minority errors may remain hidden. Balanced metrics reveal those weaknesses more clearly.

What is balanced accuracy?

Balanced accuracy averages recall across every class. Each class receives equal influence. This helps evaluate imbalanced classification problems.

How is multiclass accuracy calculated?

Add the confusion matrix diagonal values. Divide by all matrix entries. The diagonal represents correctly classified samples.

What does top-k accuracy measure?

Top-k accuracy checks ranked prediction lists. A sample succeeds when its label appears. Larger k values usually increase accuracy.

Should I use precision or recall?

Use precision when false alarms are costly. Use recall when missed positives are costly. F1 balances both priorities together.

Can sample weights be decimals?

Yes, label mode accepts decimal sample weights. Values must remain nonnegative. Weighted counts flow into every derived metric.

How should missing denominators be handled?

Undefined metrics require careful interpretation. This calculator reports unavailable values clearly. Review class support before drawing conclusions.

Related Calculators

Confusion Matrix CalculatorRecall CalculatorSpecificity CalculatorSensitivity CalculatorFalse Positive Rate CalculatorFalse Negative Rate CalculatorMatthews Correlation Coefficient CalculatorBalanced Accuracy CalculatorLog Loss CalculatorBinary Cross-Entropy Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.