Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

First derivative s'_a(x)
0.2350037122
dimensionless
Sigmoid value s_a(x) 0.6224593312
Second derivative s''_a(x) -0.0575567949

What this calculator does

This tool computes the first derivative of the logistic sigmoid function with a gain (steepness) parameter a, evaluated at a point x. The sigmoid is one of the most common activation functions in neural networks and logistic regression, and its derivative is exactly what backpropagation needs to update weights. As a bonus, the calculator also returns the sigmoid value itself and the second derivative at the same point.

How to use it

Enter the gain a (default 1) and the evaluation point x (default 0.5). Both are pure, dimensionless real numbers with no units. Press calculate to read the first derivative as the main result, with the sigmoid value and second derivative shown below.

The formula explained

The sigmoid is \(s_a(x) = \frac{1}{1 + e^{-a x}}\). A convenient property is that its derivative can be written entirely in terms of its own output:

$$s'_a(x) = a \cdot s_a(x) \cdot \bigl(1 - s_a(x)\bigr)$$

The second derivative follows as

$$s''_a(x) = a^2 \cdot s_a(x) \cdot \bigl(1 - s_a(x)\bigr) \cdot \bigl(1 - 2 s_a(x)\bigr)$$

Because \(1 + e^{-a x}\) is always positive, the function is defined for every real a and x — there is no division by zero.

Advertisement
S-shaped sigmoid curve and its bell-shaped first derivative on the same axes
The sigmoid (S-curve) and its bell-shaped first derivative.

Worked example

With \(a = 1\) and \(x = 0.5\): \(a\cdot x = 0.5\), so \(e^{-0.5} \approx 0.60653\) and

$$s = \frac{1}{1.60653} \approx 0.622459$$

Then

$$s' = 1 \cdot 0.622459 \cdot (1 - 0.622459) \approx 0.235004$$

and

$$s'' = 0.235004 \cdot (1 - 2\cdot 0.622459) \approx -0.057557$$
Sigmoid curve with tangent line touching at a marked point
The first derivative equals the slope of the tangent line at point x.

FAQ

Where does the derivative reach its maximum? When \(a > 0\) the slope peaks at \(x = 0\), where \(s = 0.5\) and the derivative equals \(a/4\).

What happens when a = 0? The sigmoid collapses to the constant 0.5, so both the first and second derivatives are 0.

Why use the gain parameter? Larger \(|a|\) makes the transition steeper (closer to a step function); smaller \(|a|\) makes it more gradual. A negative a flips the curve.

Last updated: