Sigmoid Function Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter x. Keep L = 1, k = 1 and x₀ = 0 for the standard sigmoid used in statistics and neural networks.
Result
f(x) = L ÷ (1 + e^(−k(x − x₀)))
Derivative f′(x) = k f (1 − f/L)
- L − f(x)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Input x: enter a number.
- Maximum value L (1 for the standard sigmoid): enter a number.
- Steepness k: enter a number.
- Midpoint x₀: enter a number.
- Read the result: f(x) = L ÷ (1 + e^(−k(x − x₀))); the panel also shows Derivative f′(x) = k f (1 − f/L) and L − f(x).
How this calculator works
The standard sigmoid, or logistic function, is σ(x) = 1/(1 + e⁻ˣ). It maps any real number into (0, 1), equals 0.5 at x = 0, and satisfies σ(−x) = 1 − σ(x). Its derivative is σ′(x) = σ(x)(1 − σ(x)).
The general logistic curve f(x) = L/(1 + e^(−k(x − x₀))) (P.-F. Verhulst, 1838) has maximum L, steepness k and midpoint x₀; its derivative is k f(x)(1 − f(x)/L). The standard sigmoid is the case L = 1, k = 1, x₀ = 0.
The formula
| Symbol | Meaning |
|---|---|
| Input x | |
| Maximum value L (1 for the standard sigmoid) | |
| Steepness k | |
| Midpoint x₀ | |
| f(x) = L ÷ (1 + e^(−k(x − x₀))) |
Worked example
| Input x | 0 |
|---|---|
| Maximum value L (1 for the standard sigmoid) | 1 |
| Steepness k | 1 |
| Midpoint x₀ | 0 |
| Derivative f′(x) = k f (1 − f/L) | 0.25 |
|---|---|
| L − f(x) | 0.5 |
f(x) = L ÷ (1 + e^(−k(x − x₀))) 0.5
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is σ(0)?
1/(1 + 1) = 0.5, and the slope there is 0.25, the largest it gets.
What is σ(2)?
1/(1 + e⁻²) ≈ 0.8808.