ROC AUC Calculator
Calculate the area under the ROC curve to evaluate classifier performance.
About ROC AUC Calculator
The ROC curve plots true positive rate (TPR) against false positive rate (FPR) at every possible classification threshold. The area under this curve (AUC) summarizes overall discriminative ability across all thresholds in a single number: AUC = 1.0 is a perfect classifier, AUC = 0.5 is equivalent to random guessing, and AUC below 0.5 means the model is worse than random (or its predictions are inverted). This calculator numerically integrates the curve from a list of (FPR, TPR) points using the trapezoidal rule.
Formula
AUC = sum((TPR_i + TPR_{i+1}) / 2 * (FPR_{i+1} - FPR_i))
- TPR_i
- True positive rate at point i
- FPR_i
- False positive rate at point i
Worked example
With the default values below, ROC AUC Calculator returns ROC-AUC of 0.7600. Change any input above and every figure here is recalculated in your browser.
Inputs used
- FPR, TPR Points
- 0,0; 0.1,0.4; 0.2,0.6; 0.4,0.8; 0.6,0.9; 1,1
Results
- ROC-AUC
- 0.7600
- Number of Points
- 6
Step by step
- 1Sort points by FPR ascending= 6 points
- 2AUC: Σ trapezoid areas between consecutive points= 0.7600
Assumptions and limits
- The result is derived only from the single input listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 4 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why does AUC = 0.5 mean random guessing?
An AUC of 0.5 corresponds to a diagonal ROC curve where TPR equals FPR at every threshold, meaning the classifier's ranking of positive vs. negative examples is no better than chance.
How many points do I need for an accurate AUC estimate?
More points give a finer approximation of the true curve; a smooth classifier evaluated at many thresholds gives near-exact AUC via the trapezoidal rule, while very few points can noticeably underestimate the true area.
Is ROC-AUC affected by class imbalance?
ROC-AUC is relatively robust to class imbalance because it's based on rates (TPR, FPR) rather than raw counts, but on highly imbalanced datasets, PR-AUC is often considered more informative since it focuses on the minority (positive) class.
