ROC Curve Calculator

Analyse classifier discrimination, plot ROC curves, calculate AUC, compare models, optimise thresholds, inspect confusion metrics, and export clear machine learning evaluation reports instantly online.

Calculator inputs

Use commas, spaces, tabs, or new lines.
Values outside 0–1 are accepted as decision scores.
Enter one row per point. Format: FPR, TPR, optional threshold.
Enter one row per threshold. Format: threshold, TP, FP, TN, FN.
Format each row as Model name|comma-separated scores.
One observation per row. Columns must follow the class-name order.

Threshold optimisation and operating costs

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

  1. Select the calculation mode matching your available data.
  2. Paste labels, scores, coordinates, matrices, or model rows.
  3. Select the positive class and score direction.
  4. Choose a threshold objective and optional operating constraints.
  5. Enter misclassification costs when errors have different consequences.
  6. Enable bootstrap analysis when an empirical AUC interval is needed.
  7. Submit the form, inspect the ROC graph, and review warnings.
  8. Export the summary, table, graph, JSON, CSV, or PDF report.

Example data

ObservationActual labelPrediction scoreMeaning
110.95Likely positive case
210.88Likely positive case
300.81Possible false positive
410.76Moderate positive score
500.35Likely 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.

Related Calculators

Confusion Matrix CalculatorClassification Accuracy CalculatorRecall CalculatorSpecificity CalculatorSensitivity CalculatorFalse Positive Rate CalculatorFalse Negative Rate CalculatorMatthews Correlation Coefficient CalculatorBalanced Accuracy CalculatorLog Loss Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.