ROC AUC Calculator
Can the Model Rank Positives Above Negatives?
AUC (Area Under the ROC Curve) answers a specific question that's independent of any particular decision threshold: if you picked one random positive example and one random negative example, what's the probability the model scores the positive one higher? A perfect ranker scores 1.0, random guessing scores 0.5, and a model that ranks backward scores below 0.5.
The Formula
U = RankSum(positives) − n_pos(n_pos+1)/2
This is the Mann-Whitney U statistic method for computing AUC: every score across both classes is ranked together (ties get an averaged rank), the ranks belonging to positive-class scores are summed, and that sum is converted into the AUC value. It's mathematically equivalent to the area under the ROC curve but doesn't require sweeping every threshold.
Where This Matters
- Model comparison — AUC gives a single, threshold-independent number to compare two classifiers' overall ranking ability.
- Imbalanced classification — AUC is less sensitive to class imbalance than raw accuracy.
- Credit scoring and risk models — AUC is a standard evaluation metric where the model's job is to rank cases by risk rather than just classify them.
Interpretation Scale and Worked Examples
| AUC range | Interpretation |
|---|---|
| 0.5 | No better than random guessing |
| 0.5–0.7 | Poor discrimination |
| 0.7–0.8 | Acceptable discrimination |
| 0.8–0.9 | Excellent discrimination |
| 0.9–1.0 | Outstanding discrimination |
Example: positive scores [0.6, 0.7, 0.4] vs. negative scores [0.5, 0.3, 0.55] computes to AUC = 0.778 (acceptable discrimination), verified with this calculator's exact rank-sum formula.
How to Use This Calculator
- Enter the Positive class scores as a comma-separated list.
- Enter the Negative class scores as a comma-separated list.
- Select Calculate to get the AUC value and its interpretation.
Related Calculations
Check threshold-specific performance with the Confusion Matrix Calculator, or see the combined precision/recall metric with the F1 Score Calculator.