Skip to content
ENExplore Calculators

Accuracy Calculator

Calculate classification accuracy from correct predictions and total samples.

About Accuracy Calculator

Accuracy is the fraction of all predictions that were correct: accuracy = (TP + TN) / (TP + TN + FP + FN). It's the most intuitive classification metric, but it can be misleading on imbalanced datasets — a classifier that always predicts the majority class can score high accuracy while completely failing the minority class. For imbalanced problems, precision, recall, F1, or balanced accuracy usually give a more honest picture of performance.

Formula

accuracy = (TP + TN) / (TP + TN + FP + FN)

TP
True positives
TN
True negatives
FP
False positives
FN
False negatives

Worked example

With the default values below, Accuracy Calculator returns Accuracy of 0.93%. Change any input above and every figure here is recalculated in your browser.

Inputs used

True Positives (TP)accepts 0–1,000,000,000
80
True Negatives (TN)accepts 0–1,000,000,000
850
False Positives (FP)accepts 0–1,000,000,000
20
False Negatives (FN)accepts 0–1,000,000,000
50

Results

Accuracy
0.93%
Error Rate
0.07%
Total Predictions
1,000

Step by step

  1. 1Total predictions: TP + TN + FP + FN= 1000
  2. 2Accuracy: (TP + TN) / total= 0.9300

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

When is accuracy a misleading metric?

On imbalanced datasets, a model can achieve high accuracy simply by always predicting the majority class, while providing no real predictive value for the minority class. In those cases, precision, recall, F1, or balanced accuracy are more informative.

What's a good accuracy score?

It depends entirely on the task and class balance. 95% accuracy is unremarkable on a dataset that's 95% one class, but excellent on a balanced, hard classification problem — always compare against a naive baseline.

How is accuracy different from precision?

Accuracy measures overall correctness across both classes, while precision measures correctness only among the predictions labeled positive — precision ignores true negatives entirely.

Accuracy Calculator – Calculate Accuracy & Error Rate