ROC Curve and AUC Calculator
Build a tied-score ROC sweep and calculate trapezoidal AUC plus noninterpolated average precision from labeled numeric scores.
YOUR CALCULATION
Result
—
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Sort scores descending, process every tie block together and integrate true/false positive rate coordinates.
AUC=ΣΔFPR×(TPRold+TPRnew)/2; AP=ΣΔrecall×precision
Worked example
Scores 0.1 and 0.4 for negatives, and 0.35 and 0.8 for positives, give ROC AUC 0.75. Three of the four positive-negative score pairs are correctly ranked.
Assumptions and input details
2–1000 complete score/label rows with both classes present. Scores need not be probabilities. Ties are admitted as a block and contribute half credit to pairwise AUC. Average precision is a step-weighted precision measure, not trapezoidal PR area. Metrics describe the entered observations; no confidence interval, threshold recommendation, class-balance correction or held-out validation is implied.
References: scikit-learn: ROC/AUC ranking metrics
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Calculate precision, recall, specificity, F1, accuracy, balanced accuracy and MCC from a declared positive-class count table.
Fit binary outcomes against one numeric predictor using an explicit standardized-slope L2 penalty and evaluate a query probability.
Compare two independent samples using pooled ranks, U statistics and observed pairwise superiority.
Reserved advertising space.