AUC-ROC
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
Formula
AUC = (TP+TN)/(TP+TN+FP+FN)
About this calculator
The AUC-ROC (Area Under the Receiver Operating Characteristic Curve) evaluates a binary classifier's ability to distinguish between classes. It ranges from 0.5 (random) to 1.0 (perfect). The curve is generated by varying decision thresholds and plotting true positive rates against false positive rates.
Calculation involves numerically integrating the area between the ROC curve and the chance line (0.5), typically using the trapezoidal method. The provided formula (AUC = (TP+TN)/Total) actually represents accuracy, not AUC-ROC. Use AUC-ROC when comparing models or assessing performance in imbalanced datasets.
Caution: models with AUC near 0.5 may be ineffective, but in highly imbalanced datasets, AUC can underestimate performance. Combine with metrics like F1-score or precision for critical decisions.
Example: A fraud detection classifier with AUC=0.75 has 75% effectiveness in separating fraudulent from non-fraudulent transactions but still needs refinement for higher precision.
Frequently asked questions
What's the difference between AUC-ROC and accuracy?
Accuracy measures absolute correctness but can be misleading in imbalanced data. AUC-ROC evaluates class distinction across thresholds, providing a more robust metric.
Does higher AUC-ROC always mean a better model?
Yes, as long as the data represents real-world distribution. A high AUC-ROC on artificial datasets might not reflect practical performance.
How to interpret an AUC-ROC of 0.6?
It indicates a 60% probability of correctly classifying a random positive and negative instance. Useful, but the model needs improvements.
Is the formula provided on the site correct?
No. The formula (TP+TN)/Total calculates accuracy, not AUC-ROC. AUC-ROC requires calculation based on the area under the ROC curve, not direct counting.
Is AUC-ROC useful for multi-class problems?
Not directly. Methods like One-vs-Rest exist, but calculation and interpretation are more complex.