SigmaCalc
Logistic Regression Calculator
Plug in fitted coefficients and an input value to see the predicted probability the sigmoid function produces.
Logistic regression predicted probability
The model computes a linear score from the intercept and coefficient, then squashes it through the logistic function into a probability between 0 and 1.
| Intercept | Coefficient | x | Linear score | Predicted probability |
|---|---|---|---|---|
| -2 | 0.5 | 2 | -1.000 | 0.2689 |
| -2 | 0.5 | 4 | 0.000 | 0.5000 |
| -2 | 0.5 | 6 | 1.000 | 0.7311 |
| 0 | 1 | 0 | 0.000 | 0.5000 |
| 0 | 1 | 2 | 2.000 | 0.8808 |
| 1 | -0.5 | 3 | -0.500 | 0.3775 |
A linear score of 0 always maps to a probability of exactly 0.5, which is the decision boundary - rows two and four show it arriving from different parameter sets. The relationship is not linear in x: moving the score from 0 to 1 raises the probability by 23 points, but from 2 to 3 raises it by only about 7, because the curve flattens towards the extremes. That is the point of the logistic function - it keeps predictions inside 0 and 1 no matter how large the inputs get. A negative coefficient, as in the last row, means the probability falls as x rises.
This calculates from coefficients, not to them
Fitting a logistic regression model (finding the best b₀ and b₁ from training data) requires iterative optimization beyond what a single-formula calculator can do — this tool evaluates a model you already have, converting coefficients and an input into a predicted probability.
Why probabilities, not straight lines
A plain linear model can predict nonsensical probabilities like 1.4 or −0.2. The sigmoid function used here squashes any input into the valid 0-to-1 range, which is exactly why logistic regression is the standard tool for binary outcomes.
Frequently asked questions
How is logistic regression different from linear regression?
Linear regression predicts a continuous value (house price, temperature). Logistic regression predicts the probability of a yes/no outcome (will the customer buy? will the patient recover?). Linear uses a straight line; logistic uses an S-shaped sigmoid curve that stays between 0 and 1.
What does the sigmoid function do?
The sigmoid σ(z) = 1/(1+e⁻ᶻ) maps any input to a probability between 0 and 1. When z = 0, output = 0.5. Large positive z → output near 1. Large negative z → output near 0. It creates the characteristic S-curve of logistic regression.
What are the coefficients b₀ and b₁?
b₀ (intercept) sets the baseline probability when x = 0. b₁ (slope) determines how much each unit increase in x shifts the log-odds. Positive b₁ = higher x increases probability. Negative b₁ = higher x decreases probability. This calculator evaluates a model you already have — it doesn't fit the coefficients from raw data.
Related Math calculators
Hypergeometric Distribution Calculator
Probability of k successes drawn without replacement.
OpenExponential Distribution Calculator
Probability density and cumulative probability of waiting times.
OpenAcceleration Calculator
Acceleration from initial and final velocity over time.
OpenKinetic Energy Calculator
Kinetic energy of a moving object.
OpenLast updated: September 6, 2026