%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

ROC AUC Calculator (from scores & labels)

Results update as you type.

Your numbers

Understanding the ROC AUC calculator — concept and principle

The area under the ROC curve (AUC) summarises how well a model's scores rank positive cases above negative ones, across every possible decision threshold. Enter the model's predicted scores and the true 0/1 labels, and the calculator returns the AUC and the Gini coefficient. It is widely used for credit scoring, medical tests and any classifier that outputs a score or probability.

AUC as a tournament of positive–negative pairsEach of the four positive scores is compared with each of the four negative scores. The positive scores higher in 13 of the 16 pairs, so AUC = 0.8125 and Gini = 0.625.Every positive vs every negativeNegatives (label 0)Positives(label 1)0.70.550.30.20.94/40.84/40.63/40.42/413 wins ÷ 16 pairs = AUC 0.8125Gini = 2 × 0.8125 − 1 = 0.625
AUC is the share of positive–negative pairs ranked correctly: 13 of 16.

How it is calculated

Scores only need to be comparable; they do not have to be probabilities, and any strictly increasing transformation leaves the AUC unchanged.

The principle

The ROC curve plots the true positive rate against the false positive rate as the threshold moves from high to low. Its area has a neat meaning: it equals the probability that a randomly chosen positive gets a higher score than a randomly chosen negative. That is exactly the Mann-Whitney U statistic divided by the number of pairs, which is why counting pairs gives the same answer as integrating the curve. Because it uses only the order of scores, AUC measures ranking quality, not calibration.

Worked example

  1. Positives (label 1): 0.9, 0.8, 0.6, 0.4. Negatives (label 0): 0.7, 0.55, 0.3, 0.2. That gives 4 × 4 = 16 pairs.
  2. 0.9 beats all 4 negatives; 0.8 beats all 4; 0.6 beats 0.55, 0.3 and 0.2 (3); 0.4 beats 0.3 and 0.2 (2).
  3. Total = 4 + 4 + 3 + 2 = 13, so AUC = 13 ÷ 16 = 0.8125.
  4. Gini = 2 × 0.8125 − 1 = 0.625.

How to read the result

Where does your result fall?Worse than chanceWeak≥10.70.80.9Worse than chanceWeakAcceptableGoodExcellentYour result: 0.8125 · GoodReference: Hosmer & Lemeshow AUC rules of thumb
Where does your result fall?

AUC = 0.5 means the scores rank no better than chance, 1.0 means every positive outranks every negative, and values below 0.5 mean the ranking is reversed. Rough conventions call 0.7–0.8 acceptable and 0.8–0.9 good, but the useful level depends on the field. With very few cases, as here, AUC is unstable: moving one score can change it by a sixteenth.

Common mistakes

Keep in mind: AUC summarises all thresholds at once, including ones you would never use. It does not tell you which threshold to pick or what error costs to expect.

Frequently asked questions

Why is Gini equal to 2 × AUC − 1?

It rescales AUC so that chance is 0 and perfect ranking is 1; in credit scoring this is also called the accuracy ratio.

How are ties handled?

Each tied positive-negative pair counts as half a win, which matches the trapezoidal area under the ROC curve.

Can I compute AUC for more than two classes?

Yes, by averaging one-versus-rest or one-versus-one AUCs, but this calculator handles the binary case.

Sources: J. A. Hanley and B. J. McNeil, The meaning and use of the area under a receiver operating characteristic (ROC) curve, Radiology, 1982 · T. Fawcett, An introduction to ROC analysis, Pattern Recognition Letters, 2006

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →