Accuracy Calculator

Find classification accuracy from a confusion matrix.

Accuracy (%) 85

Formula: accuracy = (TP + TN) ÷ total

Step-by-step with your numbers:
1. Values used:
2. True positives = 80
3. True negatives = 90
4. False positives = 10
5. False negatives = 20
6.
7. Accuracy = 85%
Did we solve your problem today?

Accuracy is the fraction of all predictions a classifier got right.

How the Math Works

The Accuracy Calculator uses a straightforward mathematical formula to evaluate classification performance. The calculation is: accuracy = (TP + TN) ÷ total, where TP represents True Positives (correctly predicted positive cases), TN represents True Negatives (correctly predicted negative cases), and total is the sum of all outcomes in the confusion matrix (TP + TN + FP + FN). This formula essentially measures the proportion of correct predictions out of all predictions made, giving you a single percentage value that summarizes the overall correctness of a classification model. The result ranges from 0% (completely inaccurate) to 100% (perfectly accurate).

Practical Applications

To use this calculator, you'll need to extract the values from your confusion matrix and input them into the appropriate fields. First, identify your True Positives (TP) - these are cases where your model correctly predicted the positive class. Next, find your True Negatives (TN) - cases where your model correctly predicted the negative class. Add these two values together, then divide by the total number of predictions (the sum of all four confusion matrix values: TP + TN + False Positives + False Negatives). For example, if you have 50 TP, 80 TN, 10 FP, and 20 FN, your accuracy would be (50 + 80) ÷ 160 = 81.25%.

Day-to-Day Use

Accuracy calculations help us make better decisions in everyday technology use. When your phone's voice assistant correctly understands your commands most of the time, or when online shopping recommendations match your preferences, accuracy metrics are working behind the scenes. In healthcare, accuracy helps doctors evaluate diagnostic tools - ensuring that medical tests correctly identify conditions. For students, understanding accuracy helps interpret test results and grading systems. Even in personal finance apps that categorize your expenses correctly, accuracy calculations ensure your financial data is properly organized. This metric helps us trust and improve the technology we use daily.

Worked example

80 + 90 correct of 200 → 85%.

FAQ

Why isn't accuracy always enough?

On rare events, a model can be 'accurate' by always predicting the majority class.