Skip to main content
Calcimator

Logistic Regression Calculator

Calculate the predicted probability, odds, and odds ratio from logistic regression coefficients. Visualize the S-shaped probability curve.

About this calculator

This calculator evaluates a logistic regression model at a single point: given an Intercept (β₀), a Coefficient (β₁), and a Predictor Value (x) you supply directly, it computes the log-odds (logit = β₀ + β₁x), converts that into a Predicted Probability with the sigmoid function 1 / (1 + e^-logit), and reports Odds and the Odds Ratio per unit x separately. Odds Ratio depends on exactly one input: its formula, Math.exp(beta1), never reads β₀ or the Predictor Value at all, so both are genuinely inert on that output — not a rounding artifact, a direct fact about which variable appears in the line of code. Coefficient (β₁) and Predictor Value (x) have an identical measured effect on Predicted Probability under a small nudge, because the logit only ever uses their product (β₁ × x), and scaling either factor by the same percentage shifts that product by the same amount. What the calculator does NOT do: it never fits β₀ or β₁ from data — you provide already-estimated coefficients, and the tool only evaluates the resulting model at one x value, plus a curve of nearby points for the chart.

The Odds and Odds Ratio outputs are also capped with Math.min(value, 99999) as a display safety net. For Odds Ratio that ceiling is unreachable within the calculator's own declared β₁ range of -10 to 10, since e^10 is only about 22,026. Odds is a different story: it's Math.exp(beta0 + beta1 * xValue), which draws on the much wider β₀ range (-20 to 20) and Predictor Value range (-1000 to 1000), so the logit can climb well past 11.5 and the cap engages easily — a logit of just 12, for instance, produces a raw odds of about 162,754, which the display clamps down to 99,999.

Inputs

Results

Predicted Probability

0.73

Odds Ratio (per unit x)

1.65

Odds2.72
Log-Odds (Logit)1
Predicted Class (0 or 1)1
Marginal Effect at x0.1
How to Use This Calculator
  1. Enter Intercept (β₀), Coefficient (β₁), and Predictor Value (x).
  2. Review Predicted Probability and Odds Ratio (per unit x).
  3. Use Odds and Log-Odds (Logit) to inform your decision.
  4. Use the chart to visualize the results and explore different scenarios by adjusting inputs.

How the result changes with Coefficient (β₁)

Coefficient (β₁)Predicted ProbabilityOdds Ratio (per unit x)
0.250.271.28
0.380.51.46
0.750.952.12
1.2513.49

What each input means

Intercept (β₀)
The intercept coefficient of the logistic regression model.
Coefficient (β₁)
The slope coefficient for the predictor variable x.
Predictor Value (x)
The value of the independent variable for which to predict probability.

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    Intercept (β₀) = -3, Coefficient (β₁) = 0.5, Predictor Value (x) = 8 = 3 input(s) provided
  2. Calculate Predicted Probability
    Predicted Probability
    0.7311 = 0.7311
  3. Calculate Odds Ratio
    Odds Ratio = Math
    1.6487 = 1.6487
  4. Calculate Odds
    Odds = Math
    2.7183 = 2.7183
  5. Calculate Log-Odds
    Log-Odds
    1 = 1

Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Why do β₀ and Predictor Value both show zero effect on the Odds Ratio?

It's not a rounding coincidence — the engine's Odds Ratio formula, const oddsRatio = Math.exp(beta1), is written to depend on β₁ alone. Neither β₀ nor the Predictor Value appears anywhere in that line, so changing either one, by any amount, leaves the Odds Ratio completely unchanged; only β₁ ever moves it.

Why do Coefficient (β₁) and Predictor Value (x) move Predicted Probability by the same amount?

The logit is computed as beta0 + beta1 * xValue, and only the product of β₁ and x feeds into the sigmoid function — the two factors never appear separately. Scaling either one by the same percentage changes that product by the same amount, so a small nudge to either input shifts Predicted Probability by an equal measured amount at any given starting point.

Does this calculator fit a logistic regression model to my data?

No. It assumes you already have fitted coefficients — β₀ and β₁ — from some other source (statistical software, a published study, a prior analysis) and simply evaluates the resulting sigmoid model at one Predictor Value you supply. There is no data-fitting step anywhere in the engine; it is a pure evaluator, not an estimator.

Is there any limit on how large the Odds or Odds Ratio can display?

Yes — both are wrapped in Math.min(value, 99999) before rounding, as a display safety net against runaway exponentials. For Odds Ratio that ceiling never actually engages within the calculator's own allowed β₁ range of -10 to 10, since e^10 is only about 22,026 — well under the 99,999 cap even at the most extreme coefficient the input field permits. Odds is not protected the same way: it depends on the logit (β₀ + β₁ × x), and because β₀ can range to ±20 and the Predictor Value to ±1000, the logit can easily exceed roughly 11.5, at which point Odds does hit the cap and displays the clamped 99,999 rather than the true, larger value.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.