Sigmoid and Logit Calculator
Calculate the logistic sigmoid and its derivative, then use the inverse logit to convert any probability to log-odds and back.
Frequently Asked Questions about the Sigmoid and Logit Calculator
What does the sigmoid function calculate?
The logistic sigmoid is sigma(x) = 1 / (1 + e^-x), an S-shaped curve that maps any real number x to a probability between 0 and 1. You enter x, the log-odds, and the calculator returns sigma(x), its derivative, and the matching odds. It is the activation used in logistic regression and in many neural networks.
How is the sigmoid derivative computed?
The derivative is sigma'(x) = sigma(x) times (1 - sigma(x)), so once you know sigma(x) you never differentiate from scratch. It peaks at 0.25 when x is 0 and shrinks toward 0 as x moves far from the center. This is the exact form backpropagation uses to push gradients through a sigmoid layer.
What is the logit, or inverse sigmoid?
The logit is logit(p) = ln(p / (1 - p)), the natural log of the odds, and it is the exact inverse of the sigmoid. Switch to logit mode, enter a probability p, and you get the log-odds x such that sigma(x) = p. This is how logistic regression turns a probability back into the linear score it actually models.
How do probability, odds, and log-odds relate?
Odds are p / (1 - p), so a probability of 0.8 is odds of 4 to 1. The log-odds (logit) is the natural log of those odds, and the sigmoid converts log-odds back into a probability. The calculator shows all three at once so you can move between them in either direction.
Why must the probability stay between 0 and 1 for the logit?
The logit divides by (1 - p) and then takes a logarithm, so p has to sit strictly inside the open interval from 0 to 1. At p = 0 the odds are 0 and the log is undefined, and at p = 1 the odds are infinite, so both ends return no result. Use values such as 0.01 to 0.99 to see finite log-odds.
Related Calculators
More calculators in "Math"
Singular Value Decomposition (SVD) CalculatorSpearman's Rank Correlation CalculatorTwo-Proportion Z-Test CalculatorChinese Remainder Theorem CalculatorCohen's d CalculatorEuler's Totient Calculator
See all 202 calculators in "Math"