Accuracy Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter the four counts of a test or classification model to see how often it is right.
Result
Accuracy
Error rate
- Balanced accuracy
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- True positives (TP): enter 0 or more.
- True negatives (TN): enter 0 or more.
- False positives (FP): enter 0 or more.
- False negatives (FN): enter 0 or more.
- Read the result: Accuracy; the panel also shows Error rate and Balanced accuracy.
How this calculator works
Accuracy = (TP + TN) ÷ (TP + TN + FP + FN): the share of all cases classified correctly. Error rate = 1 − accuracy.
Balanced accuracy = (sensitivity + specificity) ÷ 2, with sensitivity = TP ÷ (TP + FN) and specificity = TN ÷ (TN + FP). It is more informative than accuracy when one class is much rarer than the other.
The formula
| Symbol | Meaning | Unit |
|---|---|---|
| True positives (TP) | ||
| True negatives (TN) | ||
| False positives (FP) | ||
| False negatives (FN) | ||
| Accuracy | % |
Worked example
| True positives (TP) | 85 |
|---|---|
| True negatives (TN) | 890 |
| False positives (FP) | 10 |
| False negatives (FN) | 15 |
| Error rate | 2.5% |
|---|---|
| Balanced accuracy | 91.94% |
Accuracy 97.5%
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
Why can high accuracy be misleading?
With 1,000 cases and only 100 positives, a model that always says "negative" is 90% accurate but finds no positive case; its balanced accuracy is 50%.
What is the accuracy for TP 85, TN 890, FP 10, FN 15?
(85 + 890) ÷ 1,000 = 97.5%.