Percentages and Math

AUC ROC Calculator

Paste a score and a 1 or 0 label on each line to get the ROC curve and the area under it.

Your numbers

A higher score means more likely positive. Example data.

More options

Result

Area under the ROC curve (AUC)

0.7778

95% interval from 0.503 to 1.000.

AUC
0.7778
AUC from ranks (check)
0.7778
Standard error (Hanley and McNeil)
0.1402
Positive cases
6
Negative cases
6
Cutoff with the largest TPR minus FPR
score of 0.66 or more
TPR and FPR at that cutoff
0.667 and 0.167

ROC points

Score cutoff (or more)True positive rateFalse positive rateTPR minus FPR
0.950.16670.00000.1667
0.880.33330.00000.3333
0.80.33330.16670.1667
0.740.50000.16670.3333
0.660.66670.16670.5000
0.610.66670.33330.3333
0.550.83330.33330.5000
0.470.83330.50000.3333
0.380.83330.66670.1667
0.31.00000.66670.3333
0.221.00000.83330.1667
0.11.00001.00000.0000
How this was calculated
  1. Sort the scores from high to low and move down the list. At each distinct score, the true positive rate is the positives caught so far divided by 6, and the false positive rate is the negatives caught divided by 6.
  2. Adding up the trapezoids under those points gives the area 0.777778. The rank method (the chance a random positive scores above a random negative, counting ties as half) gives 0.777778, which agrees.
  3. The interval uses the Hanley and McNeil standard error, a normal approximation that works best with a fair number of cases of each kind.
  • An AUC of 0.5 means the score ranks cases no better than chance and 1 means it ranks every positive above every negative. The cutoff with the largest TPR minus FPR is one convention and ignores the cost of each kind of error. This page is for evaluating models and tests, not for making decisions about a person.

Calculated using SumPanda.com · https://sumpanda.com/auc-roc-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the auc roc calculator

  1. Paste one line per case with a score and a label, such as "0.82, 1". Use 1 for a positive case and 0 for a negative case.
  2. A higher score should mean more likely positive. The example data show the layout.
  3. Open the options to change the confidence level for the interval.
  4. Read the area under the curve, the interval, the ROC points and the cutoff with the largest true positive rate minus false positive rate.

Formula

for each score cutoff c: TPR = positives with score >= c / all positives, FPR = negatives with score >= c / all negatives

AUC = area under the points (FPR, TPR) by the trapezoid rule

check: AUC = (rank sum of positives - n+ (n+ + 1) / 2) / (n+ x n-), with ties ranked by average

SE (Hanley and McNeil) = sqrt((A (1 - A) + (n+ - 1)(Q1 - A^2) + (n- - 1)(Q2 - A^2)) / (n+ n-)), Q1 = A / (2 - A), Q2 = 2 A^2 / (1 + A)

The two ways of finding the area are both calculated and agree. The area is the chance that a randomly chosen positive case has a higher score than a randomly chosen negative one, with ties counted as half.

Twelve scored cases

Six positive and six negative cases with scores 0.95 (positive), 0.88 (positive), 0.80 (negative), 0.74, 0.66, 0.61, 0.55, 0.47, 0.38, 0.30, 0.22 and 0.10 give an area of 0.7778. Of the 36 pairs of one positive and one negative, 28 have the positive higher, and 28 / 36 = 0.7778.

The standard error is 0.1402, so the 95% interval runs from 0.503 up to 1 (the top is capped at 1). The cutoff with the largest true minus false rate is a score of 0.66 or more, which catches 4 of 6 positives (0.667) and 1 of 6 negatives (0.167).

Reading the curve

An AUC of 0.5 means the score ranks cases no better than chance and 1 means it ranks every positive above every negative. Below 0.5 means the scores run the wrong way and can be flipped. The curve itself shows the trade between catching positives and raising false alarms at every cutoff.

The cutoff with the largest true minus false rate (Youden's J) is one convention. It treats both kinds of error as equally costly, which is often not true. See the Confusion Matrix Calculator for the measures at a single cutoff.

Cautions

The interval is a normal approximation that works best with a fair number of cases of each kind. With very few positives or negatives it can be misleading, and the true uncertainty is larger. Use this page to evaluate models and tests on data you already have, and not to make decisions about a person.

More statistics tools

For related statistical tests and measures, try the Confusion Matrix Calculator, Test Item Analysis Calculator and Mann-Whitney U Test Calculator.

Assumptions and limits

  • Each line has one score and one label, and the labels are only 0 and 1.
  • A higher score means more likely to be positive.
  • Tied scores are treated as a single cutoff, and ties count as half in the rank method.
  • The interval uses the Hanley and McNeil standard error with a normal approximation.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What is AUC in a ROC curve?

It is the area under the curve of true positive rate against false positive rate. It equals the chance that a random positive case scores higher than a random negative case.

What is a good AUC value?

There is no universal threshold. 0.5 is chance and 1 is perfect, and what counts as useful depends on the task, the alternatives and the cost of errors.

How is the best cutoff chosen?

The page shows the cutoff with the largest true positive rate minus false positive rate. That treats both errors as equally costly, so choose a different cutoff if one error is worse.

Why do the two AUC values agree?

Both describe the same quantity. The trapezoid area under the curve equals the share of positive and negative pairs ranked correctly, with ties as half.