#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
📈 FREE · CURVE + THRESHOLDS

ROC Curve & AUC Calculator: How Well Does Your Model Rank?

Paste labels and predicted probabilities to get the ROC curve and AUC.

  • 📉 ROC curve chart
  • 🏁 Best threshold (Youden)
  • 📋 TPR and FPR table

How to use the ROC Curve and AUC Calculator

  1. 1. Paste the labelsEnter 1 for positive and 0 for negative, one per case.
  2. 2. Paste the scoresEnter the model's score or probability for each case, in the same order.
  3. 3. Read the curveSee AUC, the curve and the threshold table.

How the curve is made

For every distinct score used as a threshold, cases at or above it are predicted positive. That gives a true positive rate (TPR = TP ÷ all positives) and a false positive rate (FPR = FP ÷ all negatives). Plotting TPR against FPR for every threshold gives the ROC curve, and the area under it is the AUC, calculated with the trapezoid rule.

Worked example (default data, 5 positives and 5 negatives): the curve passes through points such as (0, 0.4), (0.2, 0.6) and (0.4, 0.8), and the AUC is 0.72. That matches scikit-learn's roc_auc_score. It also means a randomly chosen positive outscores a randomly chosen negative 72% of the time.

Reading AUC and choosing a threshold

  • 0.5 is random guessing (the diagonal). 1.0 is perfect ranking.
  • Rough guide: 0.7–0.8 fair, 0.8–0.9 good, above 0.9 excellent, though it depends on the field.
  • Youden's J = TPR − FPR picks the threshold furthest above the diagonal. It is a neutral starting point, not always the business-optimal one.
  • Imbalanced data: ROC can look rosy when positives are rare; check precision too.

AUC measures ranking, not calibration: a model can rank perfectly but give poor probabilities. Once you pick a threshold, compute precision, recall and F1 for it in the confusion matrix calculator.

Frequently asked questions

Can I paste predicted classes instead of scores?

You can, but with only 0s and 1s the curve has a single middle point. Scores or probabilities give a proper curve.

How are tied scores handled?

Tied scores share one threshold, so ties count as half in the AUC, the same as scikit-learn.

Is the ROC Curve and AUC Calculator free?

Yes, the ROC Curve and AUC Calculator is free. The first time you see your first curve, you are asked for your name and WhatsApp number once. After that, this and every other Uncodemy tool opens straight away without the form.

More free tools

See all free tools