Source: https://goodhandover.co.uk/tools/roc-auc-calculator/

[Computer science maths](https://goodhandover.co.uk/tools/computer-science-maths/#year-3) / Year 3

🔒 Files never leave your device

# ROC AUC calculator

Compute the ROC points and area from test scores and binary labels. Your inputs stay on your device.

## Set up your task

Ready. Processing stays in this browser.

Files and text stay on your device. [Privacy details](https://goodhandover.co.uk/privacy/).

 

## How to use ROC AUC calculator

Compute the ROC points and area from test scores and binary labels. The pre-filled problem gives you a worked starting point. Compare the response with your own working before trying the self-check below.

 

- Check the example inputs: Scores (higher means more positive), Labels in the same order (0 or 1).

- Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.

- Use the working to check an intermediate value or assumption. Then change the example as suggested in the self-check and compare the result.

 

## Supported inputs and limits

Enter up to 64 paired scores and 0/1 labels. Both classes must be present. Higher scores predict the positive class.

 

## How it works

An ROC curve plots the true-positive rate against the false-positive rate as a classification threshold moves. Begin above the maximum score, where nothing is predicted positive. Lowering the threshold includes more points. Equal scores enter together, so the ordering of rows tied at a threshold has no effect.

The calculator sums trapezoid areas between consecutive ROC points. AUC also corresponds to the chance that a randomly chosen positive outranks a randomly chosen negative, giving half credit to ties. This evaluates ranking quality across thresholds. A deployment threshold still requires its own decision about errors and operating conditions.

 

## Example

Run the pre-filled example. Its first result is “ROC AUC: 0.75”.

Scores (higher means more positive)

0.9 0.8 0.3 0.1

Labels in the same order (0 or 1)

1 0 1 0

ROC AUC: 0.75
Threshold: false positive rate  true positive rate
Above max: 0  0
0.9: 0  0.5
0.8: 0.5  0.5
0.3: 0.5  1
0.1: 1  1

 

## Questions about ROC AUC calculator

### Do scores have to be probabilities?

No. The ROC ranking uses the relative order of the scores. Larger scores must correspond to a stronger positive prediction.

### Can ROC AUC be computed when every label is positive?

A negative class is needed to compute the false-positive rate, so the score is undefined without both classes.

### Give both classes the same score, with one example from each.

The area is 0.5. Tied scores contribute half credit instead of placing either class first.

 
 

## Related tools

[Year 3: Advanced and applied maths](https://goodhandover.co.uk/tools/computer-science-maths/#year-3)

- [Confusion matrix calculator](https://goodhandover.co.uk/tools/confusion-matrix-calculator/)

- [Bernoulli naive Bayes calculator](https://goodhandover.co.uk/tools/naive-bayes-calculator/)

- [Huffman coding calculator](https://goodhandover.co.uk/tools/huffman-coding-calculator/)

- [Softmax and cross-entropy calculator](https://goodhandover.co.uk/tools/softmax-calculator/)

 

Last updated 24 November 2026
