Hyperbolic tangent calculator
Enter a number x and get tanh(x), with the formula it comes from.
Decimals may use a point or a comma. A sum works too, such as 2^10 or sqrt(2).
Fill in the fields; the answer appears here straight away.
How it's worked out
How it works
-
Enter the values
Type the numbers or the formula. Decimals may use a point or a comma. No idea? Click Fill in an example.
-
Instant answer
The answer appears as you type, with the most important intermediate values.
-
See the working
Under "How it's worked out" you see the steps, handy for checking your own calculation.
Definition
tanh(x) = sinh(x) / cosh(x) = (eˣ − e⁻ˣ) / (eˣ + e⁻ˣ). The result always lies between −1 and 1: it approaches 1 for large x and −1 for very negative x.
Where it is used
Because of that S-shape, tanh is a classic activation function in neural networks. It also describes the speed of a falling object with air resistance over time. See also sinh and cosh.
Frequently asked questions
Is the hyperbolic tangent (tanh) free?
Yes. The hyperbolic tangent (tanh) is completely free, with no account, sign-up or usage limit.
How accurate is the result?
The tool calculates with your browser's number precision. For important calculations, always double-check what you entered.
Does it work on my phone?
Yes. The tool works in any modern browser on a phone, tablet or computer.