Choose a calculation mode
Formula used
How to use this calculator
- Select the input mode matching your available evaluation data.
- Enter counts, labels, matrix values, or ranked predictions.
- Choose decimal precision and an interpretation threshold.
- Calculate, inspect the metrics, then export your report.
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.