Calculator inputs
Formula used
True Positive Rate (Sensitivity) = TP ÷ (TP + FN) False Positive Rate = FP ÷ (FP + TN) Specificity = TN ÷ (TN + FP) = 1 − FPR Precision = TP ÷ (TP + FP) Balanced Accuracy = (Sensitivity + Specificity) ÷ 2 Youden’s J = TPR − FPR Top-left Distance = √[FPR² + (1 − TPR)²] AUC = trapezoidal area beneath the ROC curve Gini Coefficient = 2 × AUC − 1
A ROC curve plots sensitivity against false positive rate. Each point represents one decision threshold. AUC measures how well scores rank positive cases above negative cases.
How to use
- Select the calculation mode matching your available data.
- Paste labels, scores, coordinates, matrices, or model rows.
- Select the positive class and score direction.
- Choose a threshold objective and optional operating constraints.
- Enter misclassification costs when errors have different consequences.
- Enable bootstrap analysis when an empirical AUC interval is needed.
- Submit the form, inspect the ROC graph, and review warnings.
- Export the summary, table, graph, JSON, CSV, or PDF report.
Example data
| Observation | Actual label | Prediction score | Meaning |
|---|---|---|---|
| 1 | 1 | 0.95 | Likely positive case |
| 2 | 1 | 0.88 | Likely positive case |
| 3 | 0 | 0.81 | Possible false positive |
| 4 | 1 | 0.76 | Moderate positive score |
| 5 | 0 | 0.35 | Likely negative case |
Frequently asked questions
What does a ROC curve show?
It shows sensitivity and false positive rate across decision thresholds.
What does AUC mean?
AUC measures ranking discrimination across all available thresholds.
Is a higher AUC always better?
Usually, but deployment costs and threshold performance still matter.
Why can AUC fall below 0.50?
The positive label or score direction may be reversed.
Which threshold should I choose?
Choose one matching sensitivity, specificity, costs, and operational limits.
What is Youden’s J?
It equals sensitivity plus specificity minus one.
When is a precision-recall curve preferable?
It is often more informative for strongly imbalanced positive classes.
Does ROC measure probability calibration?
No. ROC measures discrimination, not probability calibration quality.
Can multiclass predictions use ROC curves?
Yes. One-vs-rest curves produce class and average AUC values.