Skip to content

Logistic Regression Calculator

Binary logistic regression online with coefficients, odds ratios, Wald tests, McFadden R squared and ROC.

Open the Logistic Regression (binary) calculator

When to use it

Use when the outcome is binary (diseased/healthy, germinated/not, pass/fail) and you have one or more continuous or categorical predictors. The standard regression model in epidemiology, clinical trials, and binary classification problems.

When NOT to use it

Do not use for outcomes with three or more categories (use Multinomial Logistic for unordered, Ordinal Logistic for ordered). Do not use for count outcomes (Poisson or negative binomial). When the outcome rate is extremely low (under 1 percent) and n is small, exact logistic or Firth-penalised logistic give better small-sample inference.

What you get

Coefficient table with log-odds estimates, standard errors, Wald z, two-sided p, and 95 percent CIs; odds ratios with their CIs (the more interpretable scale); McFadden's pseudo R-squared; null and residual deviance with the model likelihood-ratio chi-square; classification accuracy at the 0.5 cut-off; ROC curve with AUC.

Worked example

15-subject demo: binary disease outcome predicted from Age and BMI.

Diseased: 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1
Age: 65, 42, 70, 38, 68, 50, 72, 45, 60, 35, 75, 80, 40, 30, 66
BMI: 28, 22, 31, 24, 30, 25, 32, 23, 27, 21, 33, 35, 22, 20, 29

Expected output: Both predictors increase odds of disease; Age OR per year > 1, BMI OR per unit > 1

Source: StatVeda built-in example, paired with the analyse page sample for toolId 'logistic'.

How to interpret the output

An odds ratio above 1 means the predictor increases the odds of the event; below 1 means it decreases them. A 95 percent CI for the OR that excludes 1 implies p < 0.05. McFadden pseudo R-squared between 0.2 and 0.4 indicates an excellent fit (Hensher and Stopher 1979); much lower values are normal in social and biomedical data. AUC of 0.5 is no better than random; 0.7 is acceptable; 0.8 plus is strong. The model assumes the logit is linear in continuous predictors; check this with a Box-Tidwell or by adding squared terms.

Common pitfalls

Try it in StatVeda

The Logistic Regression (binary) engine runs entirely in the browser. No signup, no install, no data sent to a server. Paste your data, hit Run, copy the output.

Open Logistic Regression (binary)

References

Related concepts

Related calculators