Skip to content

Logistic Regression Calculator

Model the probability of a binary outcome, such as pass/fail or yes/no, as a function of one or more predictors, reporting odds ratios rather than raw probabilities as the primary way to read each predictor's effect.

What this answers

This calculator answers "how does each predictor change the odds of the outcome occurring?" for a binary yes/no outcome, the standard model whenever your outcome is categorical with exactly two possible values rather than a continuous number.

How it is calculated

Coefficients are estimated by maximum likelihood using iteratively reweighted least squares (IRLS): starting from an initial guess, each iteration re-weights the data based on the current fitted probabilities and re-solves a weighted linear regression, repeating until the coefficients stop changing meaningfully or a maximum iteration count is reached. Each coefficient is exponentiated to give an odds ratio: a value above 1 means higher values of that predictor increase the odds of the outcome, and below 1 means they decrease it.

Worked example

For a predictor that clearly separates low outcomes from high outcomes as it increases (low values almost always giving 0, high values almost always giving 1), the fitted coefficient is positive and the model's predicted probabilities rise smoothly with the predictor, correctly capturing the underlying pattern even though no single value perfectly divides the two outcome classes.

Assumption audit

Calculated from your data: whether the fitting procedure converged within the iteration limit, each coefficient's estimate, standard error, and odds ratio, and whether any coefficient grew large enough to suggest separation (a classic failure mode where perfectly divided data sends a coefficient toward infinity).
Evidence to review: the separation warning above; when it appears, the reported coefficient and its standard error are not reliable point estimates, even though the fitting procedure did not technically crash.
You must verify: that your outcome variable is genuinely binary and that observations are independent of one another; logistic regression does not check either assumption on its own.

What this result does not mean

An odds ratio is not the same as a risk ratio, and treating it as one overstates the effect whenever the outcome is not rare. A significant coefficient means that predictor's association with the outcome's odds is unlikely to be exactly zero in this model, not that it causes the outcome.

Limitations

This calculator caps iterations and flags likely separation rather than resolving it; when separation is flagged, consider whether a predictor perfectly or near-perfectly predicts the outcome in your specific sample, in which case a larger sample or a different modeling approach (such as a penalized regression) is typically needed.