Binary Logistic Regression Calculator

Model binary outcomes with clear inputs and outputs. Test thresholds, coefficients, and probabilities with ease. Turn logistic patterns into practical decisions using understandable metrics.

Enter Model Inputs

Use estimated coefficients from a binary logistic model. Then enter predictor values for one observation to calculate probability, odds, class, and related diagnostics.

Reset

Example Data Table

This example shows how entered coefficients and predictors can estimate the probability of a binary event such as churn, default, approval, or disease status.

Case β0 β1 X1 β2 X2 β3 X3 Probability Predicted Class
1 -4.20 0.06 45 1.15 1 -0.80 2 12.46% 0
2 -4.20 0.06 58 1.15 1 -0.80 0 40.13% 0
3 -4.20 0.06 68 1.15 1 -0.80 0 55.52% 1
4 -4.20 0.06 50 1.15 0 -0.80 5 1.10% 0

Formula Used

1) Linear Predictor

z = β0 + β1X1 + β2X2 + β3X3 + β4X4 + β5X5

This combines the intercept and each coefficient multiplied by its predictor value.

2) Logistic Probability

p = 1 / (1 + e-z)

This transforms the logit into a probability between 0 and 1.

3) Odds

Odds = ez

Odds show how many times more likely the event is than the non-event.

4) Odds Ratio for Each Predictor

OR = eβi

An odds ratio above 1 increases event odds. Below 1 decreases event odds.

5) Marginal Effect

ME = p(1 − p)βi

This approximates how a one-unit increase in a predictor changes probability at the current observation.

6) Optional Accuracy Metrics

Residual = y − p

Log Loss = −[y ln(p) + (1 − y) ln(1 − p)]

Brier Score = (y − p)2

These require the actual outcome and help evaluate one prediction.

How to Use This Calculator

  1. Enter the intercept and up to five logistic coefficients from your fitted model.
  2. Enter the corresponding predictor values for the observation you want to score.
  3. Set a classification threshold, such as 0.50 or another policy cutoff.
  4. Optionally provide the true outcome to calculate residual, log loss, Brier score, and deviance contribution.
  5. Click the calculate button to display the result summary above the form.
  6. Review probability, odds, predicted class, coefficient contributions, and marginal effects.
  7. Use the CSV and PDF buttons to export the displayed results.

FAQs

1) What does this calculator do?

It converts logistic regression coefficients and predictor values into a predicted probability, odds, class decision, and several practical diagnostic measures for one observation.

2) Does this tool estimate coefficients from raw data?

No. It evaluates predictions from coefficients you already estimated elsewhere. Enter your fitted intercept and coefficients, then score a new or existing case.

3) What is the difference between probability and odds?

Probability is the chance of the event from 0 to 1. Odds compare event likelihood to non-event likelihood and are calculated as exp(logit).

4) What does the threshold control?

The threshold decides when a probability becomes class 1. A threshold of 0.50 predicts an event only when the probability is at least 50%.

5) Why are odds ratios shown?

Odds ratios help interpret coefficients. A value above 1 increases event odds, while a value below 1 reduces them, holding other predictors constant.

6) What is a marginal effect?

A marginal effect estimates how much the predicted probability changes for a one-unit increase in a predictor at the current observation values.

7) When should I enter the actual outcome?

Enter it when you want prediction error metrics like residual, log loss, Brier score, and whether the chosen threshold classified the case correctly.

8) Can I use fewer than five predictors?

Yes. Leave unused coefficients and predictor values as zero. The calculator will ignore their contribution and still compute the final probability correctly.

Related Calculators

Linear Regression CalculatorMultiple Regression CalculatorLogistic Regression CalculatorSimple Regression CalculatorPower Regression CalculatorLogarithmic Regression CalculatorR Squared CalculatorAdjusted R SquaredSlope Intercept CalculatorCorrelation Coefficient 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.