Home · Statistics · Probability & Combinatorics · Accuracy Calculator
Accuracy Calculator
The accuracy of a classifier or test from its confusion matrix: the share of all cases it called correctly, true positives plus true negatives over everything.
What this calculator does
The accuracy of a classifier or test from its confusion matrix: the share of all cases it called correctly, true positives plus true negatives over everything. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.
The formula and method
The four counts are the confusion matrix: rows are the true class, columns the predicted class.
Accuracy counts both kinds of correct call, so it can look high on imbalanced data even when one class is missed entirely.
Read it alongside sensitivity and specificity, which expose the per-class performance accuracy hides.
Worked example
With the example inputs this page opens with (true positives 80, false positives 10, false negatives 20, true negatives 90), the result is 85.00. Change any figure and the result updates with the same formula.
Quick reference
| True positives | Result |
|---|---|
| 40 | 81.25 |
| 64 | 83.70 |
| 80 | 85.00 |
| 100 | 86.36 |
| 120 | 87.50 |
| 160 | 89.29 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
Why can accuracy be misleading?
If 95% of cases are negative, a classifier that always says 'negative' scores 95% accuracy while finding nothing. Sensitivity, specificity and the Matthews coefficient reveal that failure; accuracy alone does not.
What accuracy counts as good?
There is no universal threshold: it depends on the class balance and the cost of each error type. Compare against the no-information rate — the share of the majority class — as the floor to beat.
How does the Accuracy Calculator work?
The accuracy of a classifier or test from its confusion matrix: the share of all cases it called correctly, true positives plus true negatives over everything. True positives · False positives · False negatives · True negatives → Accuracy (%). The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Accuracy Calculator need?
True positives · False positives · False negatives · True negatives → Accuracy (%). Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.