# How to make a sigmoid between $-1$ and $1$

I am trying to make a sigmoid which ranges from $-1$ to $1$.

I have found the formula $\dfrac{1}{​1+​e^{​\, ‑x}}-​0.5$ which creates a sigmoid between $-0.5$ and $0.5$

I need an equation that I can input $x$ and will get you the value for $y$

E.g. $y = x+5$

• Why did you down vote? Please explain
– Rlz
Apr 24, 2017 at 15:04

$y(x) = \frac{2}{1+e^{-x}} -1 = 2 \sigma(x) - 1 = \tanh(x/2)$, where $\sigma$ is the standard sigmoid and $\tanh$ is the hyperbolic tangent. Twice the range, shifted down by one. Pick your favorite form.

• What would the equation be in the format of y=
– Rlz
Apr 24, 2017 at 15:06
• The y = was implied. Apr 24, 2017 at 15:08
• Oh ok didn't realise. Thanks for the good answer. I will accept it as the answer as soon as it lets me. Any idea why they down voted?
– Rlz
Apr 24, 2017 at 15:09
• They probably thought you could think this one through. Apr 24, 2017 at 15:10
• Oh. Well that's a shame, some people need help with certain problems and that is the point of this website. Down voting because they know it and you don't spoils the point
– Rlz
Apr 24, 2017 at 15:11