Skip to content
Omnikalc

Logistic regression probability calculator

Enter the intercept and the two coefficients of a fitted logistic model and the values of the predictors to get the predicted probability, the odds and the odds ratios.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

Predicted probability

40.13 %

Log-odds (logit)
-0.400
Odds
0.670
Odds ratio for one more unit of predictor 1
1.0513
Odds ratio for one more unit of predictor 2
2.2255
Value of predictor 1 at which the probability is 50 %
68.00

The logistic regression probability calculator gives the predicted probability, the log-odds, the odds and the odds ratios from the coefficients of a fitted model and the values of two predictors.

How the calculation works

  • Enter the intercept and the coefficients of the model.
  • Enter the values of the two predictors for the case you want to score.
  • The calculator gives the probability, the log-odds, the odds, the two odds ratios and the value of predictor 1 for a probability of 50 %.

Example

With an intercept of −4.2, coefficients of 0.05 and 0.8, and values of 60 and 1, the log-odds are −4.2 + 0.05 × 60 + 0.8 × 1 = -0.400. The odds are 0.670, the probability is 1 / (1 + e^0.4) = 40.13 % and each extra unit of predictor 1 multiplies the odds by 1.0513. The probability reaches 50 % when predictor 1 equals 68.00.

Why it matters

The calculator helps students, analysts and researchers to use the output of a logistic regression, for example the risk of an event from an age and a risk factor, or the chance that a customer buys.

Good to know

Take the coefficients from your software output, with the same coding of the variables as in the fit, since a variable in years and one in months have different coefficients. A coefficient of zero leaves the probability unchanged, and a positive one raises it. The curve of the probability is an S shape, so the same increase of the log-odds changes the probability a lot near 50 % and very little near 0 % or 100 %. If your model has only one predictor, set the second coefficient to zero. To compare two cases, compute both probabilities and take their ratio or difference. Check the fit of the model with a calibration plot or a Hosmer-Lemeshow test.

The odds calculator converts odds and probabilities, the sigmoid function calculator describes the S curve, the probability calculator handles basic events and the four-parameter logistic calculator fits assay curves.

Frequently asked questions

How is the probability computed?

A logistic regression models the log-odds as a linear combination of the predictors: z = b0 + b1 x1 + b2 x2. The probability is then p = 1 / (1 + e^(−z)). The odds are e^z, and a log-odds of 0 corresponds to a probability of 50 %.

How do I read an odds ratio?

The odds ratio e^b is the factor by which the odds are multiplied when the predictor increases by one unit and the others stay fixed. A ratio of 1.05 means a 5 % increase of the odds, and a ratio below 1 means a decrease. It is not the same as a change in probability, which depends on where you start.

What can I not conclude from the result?

The probability is only as good as the model that produced the coefficients, and it holds for people or cases similar to the training data. The calculator does not give confidence intervals, which need the covariance matrix of the coefficients. It should not be used alone for a medical or financial decision.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.