Site icon Codanics

ROC Curve & AUC Calculator: Cut-off, DeLong Test

ROC Curve and AUC Calculator: free online tool by Codanics that runs in your browser
Regression & multivariate

ROC Curve Calculator: AUC with DeLong CI, Optimal Cut-off and Comparison of Two Tests

Paste a column with the test result or biomarker value and a column with the true status (diseased or healthy). The calculator draws the ROC curve, gives the area under the curve (AUC) with its DeLong 95% confidence interval, finds the optimal cut-off with the Youden index, and lists sensitivity, specificity, predictive values and likelihood ratios with exact confidence intervals. Add a second marker to compare two tests with the paired DeLong test.

✅ No login needed100% freeRuns in your browserYour data stays on your device
ROC Curve and AUC Calculator✅ Free · no login📚 Cite this tool
Your data never leaves your PC. Your data is analysed on your own computer or phone, even when you upload a CSV or Excel file. Nothing is uploaded, stored or seen by Codanics, and no login is needed.

  • PriceFree, no login or sign-up needed
  • Your dataProcessed in your browser, never uploaded
  • Works onPhone, tablet or computer, any modern browser
  • Made byDr. Muhammad Aammar Tufail, Codanics
  • Published17 November 2026
  • Last updated16 November 2026

📚 How to cite this tool

This tool is free. If it helped your thesis, paper, report or assignment, please cite it. It keeps the tools free and helps other students find them.

Citation · APA 7th edition

Tufail, M. A. (2026). ROC curve and AUC calculator with DeLong CI and optimal cut-off [Online tool]. Codanics. Retrieved 16 November 2026, from https://codanics.com/tools/roc-curve-calculator/

In-text citation: (Tufail, 2026) · Narrative: Tufail (2026)

The access date is today’s date, filled in automatically. Author: Muhammad Aammar Tufail. Published 17 November 2026.

🚀 Follow Codanics channel on WhatsApp for more updatesNew free tools, scholarships, PhD positions and research tips, straight to your phone. Free lessons on YouTube too.

How to use the ROC Curve and AUC Calculator

  1. Paste your dataset, use Paste from Excel or Upload CSV / Excel: one row per subject with the true status (from the reference standard) and the test value. A simulated study of 140 patients with two markers is loaded as an example.
  2. Choose the status column and which value means diseased (positive), then the marker. Leave the direction on Automatic unless you know that lower values indicate disease.
  3. Optionally choose a second marker measured on the same subjects to compare the two ROC curves.
  4. Click Draw ROC curve. Read the AUC with its 95% CI, the optimal cut-off and the sensitivity, specificity and predictive values at that cut-off.
  5. Open the table of all cut-offs to pick a clinically sensible threshold, download it as CSV, and save the ROC chart as PNG or SVG.

What a ROC curve shows

A receiver operating characteristic (ROC) curve plots the sensitivity (true-positive rate) against 1 − specificity (false-positive rate) for every possible cut-off of a continuous test. A useless test follows the diagonal; a perfect test goes straight up to the top-left corner. The area under the curve (AUC), also called the c-statistic, summarises discrimination in one number: the probability that a randomly chosen diseased subject has a more abnormal test value than a randomly chosen healthy one.

AUCDiscrimination (Hosmer & Lemeshow)
0.5None (chance)
0.7–0.8Acceptable
0.8–0.9Excellent
≥ 0.9Outstanding

Choosing a cut-off

The Youden index J = sensitivity + specificity − 1 picks the cut-off that maximises both together, which treats false positives and false negatives as equally bad. The “closest to top-left” criterion usually gives a similar value. In practice, choose the cut-off from the table of all cut-offs according to the purpose: high sensitivity for screening (do not miss cases), high specificity for confirming a diagnosis.

Formulas

AUC = (1/(m·n)) Σᵢ Σⱼ ψ(Xᵢ, Yⱼ), ψ = 1 if case > control, ½ if tied, 0 otherwise (Mann–Whitney form; m cases, n controls) DeLong: V₁₀(Xᵢ) = (1/n) Σⱼ ψ(Xᵢ, Yⱼ), V₀₁(Yⱼ) = (1/m) Σᵢ ψ(Xᵢ, Yⱼ), Var(AUC) = S₁₀/m + S₀₁/n, 95% CI = AUC ± 1.96·SE Paired comparison: z = (AUC₁ − AUC₂)/√(Var₁ + Var₂ − 2·Cov₁₂), covariance from the paired V₁₀ and V₀₁ components (DeLong et al., 1988) Cut-offs: midpoints between consecutive distinct test values Youden J = sensitivity + specificity − 1 PPV = Se·p / (Se·p + (1 − Sp)(1 − p)) NPV = Sp(1 − p) / (Sp(1 − p) + (1 − Se)p) LR+ = Se/(1 − Sp) LR− = (1 − Se)/Sp

The AUC, DeLong SE and CI, the Youden cut-off with its sensitivity and specificity, and the paired DeLong test all match the R package pROC (roc(), ci.auc(), coords(r, "best"), roc.test()) on the example data.

How to report it

Report the AUC with its 95% CI, the chosen cut-off and how it was chosen, sensitivity and specificity with 95% CIs, and the prevalence in your sample. Follow the STARD 2015 guideline for diagnostic accuracy studies.
Learn the statistics behind these numbers. Codanics has free statistics, R and Python lessons on YouTube and full courses for researchers.

Frequently asked questions

How do I interpret the AUC?

The AUC is the probability that the test ranks a randomly chosen diseased subject above a randomly chosen healthy one. 0.5 means no better than chance, 0.7–0.8 acceptable, 0.8–0.9 excellent and above 0.9 outstanding discrimination. Always report its 95% confidence interval.

What is the DeLong method?

DeLong, DeLong and Clarke-Pearson (1988) gave a non-parametric way to estimate the variance of the AUC and the covariance between two AUCs measured on the same subjects. It is the default in the R package pROC and in most statistics software, and it is used here for the CI and for comparing two markers.

How is the optimal cut-off calculated?

By default with the Youden index: the cut-off where sensitivity + specificity − 1 is largest. Candidate cut-offs are the midpoints between consecutive distinct test values. You can also choose the cut-off closest to the top-left corner of the ROC plot.

What if lower values indicate disease?

Leave the direction on Automatic: it compares the medians of the two groups and flips the direction when diseased subjects have lower values. Or set ‘Lower values = positive’ yourself. The AUC is then always reported as 0.5 or above.

Can I compare two diagnostic tests?

Yes, if both were measured on the same subjects. Choose the second marker; the tool shows both ROC curves and runs the paired DeLong test for the difference in AUC. For tests measured on different groups, compare the AUCs with their CIs.

Why do PPV and NPV change with prevalence?

Sensitivity and specificity are properties of the test, but predictive values also depend on how common the disease is. A test with 90% sensitivity and specificity has a PPV of only 8% when the prevalence is 1%. Enter the prevalence of your target setting to get realistic predictive values.

Can I use it for a logistic regression model?

Yes: use the predicted probabilities as the marker. The logistic regression calculator already draws the ROC curve of the fitted model.

Do I need to log in or create an account to use the ROC Curve and AUC Calculator?

No. There is no login, no sign-up and no email required. Open the page and start using it straight away, for free, on any device.

How do I cite this tool in my thesis or paper?

Use the citation box on this page. In APA 7th edition: Tufail, M. A. (2026). ROC curve and AUC calculator with DeLong CI and optimal cut-off [Online tool]. Codanics. Retrieved [date you used it], from https://codanics.com/tools/roc-curve-calculator/. BibTeX, RIS (EndNote, Mendeley, Zotero), MLA, Harvard, Chicago and Vancouver formats are also available.

Free guides and courses from Codanics

More free tools

See all free Codanics tools → · Codanics on YouTube · WhatsApp channel

Made by Dr. Muhammad Aammar Tufail, Codanics. First published 17 November 2026, last updated 16 November 2026. Found a bug or have an idea for a new tool? Tell us on the WhatsApp channel or in the comments on YouTube. Results are for learning and planning; check important analyses with a statistician or your supervisor.
Exit mobile version