Hyperbolic Tangent Calculator (tanh)

tanh(x) = sinh(x) / cosh(x). Bounded between −1 and 1. Used in neural networks.

Inputs

Result

tanh(x)
0.7615941560
Bounded in (−1, 1).
  • x1
  • sinh(x)1.17520119
  • cosh(x)1.54308063
  • tanh(x)0.7615941560
  • sech(x)1/cosh(x)0.64805427
  • Limit x→∞1
  • Limit x→−∞−1

Step-by-step

  1. sinh(x) = 1.175201; cosh(x) = 1.543081.
  2. tanh(x) = sinh / cosh = 1.1752 / 1.5431 = 0.761594.
  3. Equivalently: tanh(x) = (e^1 − e^-1) / (e^1 + e^-1).

How to use this calculator

  • Enter x.
  • Read tanh(x) + companion sinh, cosh.

About this calculator

Hyperbolic tangent: tanh(x) = sinh(x)/cosh(x) = (eˣ − e⁻ˣ)/(eˣ + e⁻ˣ). Bounded in (−1, 1) — this is why early neural networks used tanh as an activation function (sigmoidal but symmetric around 0). Modern nets prefer ReLU for speed, but tanh remains useful in RNN gates. Also appears in special relativity (rapidity), heat transfer, and signal processing.

Frequently asked

Smooth, bounded, zero-centered (unlike sigmoid which is [0,1]). Better-conditioned gradients in deep nets — but ReLU has largely replaced it.

Related calculators