Omni Calculator logo

Tanh Calculator

Created by Anna Szczepanek, PhD
Reviewed by Luis Hoyos
Last updated: Jan 18, 2024


This tanh calculator is the ultimate tool you need to deal with the hyperbolic tangent function! In what follows, we will explain what tanh is in math and how to calculate both the inverse and the derivative of tanh. We won't forget to give you extra tips on how to use this hyperbolic tangent calculator most efficiently. Let's go!

What is tanh in math?

We define tanh (that is, the hyperbolic tangent function) as follows:

tanhx=exexex+ex\small \tanh x = \frac{\mathrm{e}^x - \mathrm{e}^{-x}}{\mathrm{e}^x + \mathrm{e}^{-x}}

Okay, just some exponents and division, no big deal. It may not, however, be obvious at all why this function is called hyperbolic tangent. What does it have to do with tangents and hyperbolas?

Well, it's a slightly longer story. First, there exist functions called hyperbolic sine and hyperbolic cosine. Their definitions read:

sinhx=12(exex)coshx=12(ex+ex)\small \sinh x = \tfrac{1}{2}(\mathrm{e}^x - \mathrm{e}^{-x}) \\[0.5em] \cosh x = \tfrac{1}{2}(\mathrm{e}^x + \mathrm{e}^{-x})

They are called hyperbolic because the points (coshx\cosh x, sinhx\sinh x) trace a (part of a) hyperbola in the standard Cartesian coordinate system.

And just as the normal tangent function is the ratio of sine to cosine, also the hyperbolic tangent is the ratio of hyperbolic sine to hyperbolic cosine:

tanhx=sinhxcoshx\small \tanh x = \frac{\sinh x}{\cosh x}

Hyperbolic cotangent function

Also, just as the standard cotangent function is the multiplicative inverse of tangent, there is a function called hyperbolic cotangent defined, unsurprisingly, as follows:

cothx=1tanhx=ex+exexex\small \coth x = \frac{1}{\tanh x} = \frac{\mathrm{e}^x + \mathrm{e}^{-x}}{\mathrm{e}^x - \mathrm{e}^{-x}}

if x0x \not = 0.

Graph of hyperbolic tangent

Let's take a look at the plot of tanh:

tanh graph
Geek3, CC BY-SA 3.0, via Wikimedia Commons

From the graph of the hyperbolic tangent function, we can deduce that:

  • tanh is an odd function, i.e., tanh(x)=tanh(x)\tanh(-x) = -\tanh(x);
  • tanh is increasing;
  • tanh(0)=0\tanh(0) = 0;
  • tanh is bounded: its values sit between 1-1 and 11; and
  • tanh is a bijection, so it has an inverse.

The inverse function of tanh is called arc hyperbolic tangent. Let's discuss how to compute its values.

How do I compute the arc hyperbolic tangent?

To compute the value of arc hyperbolic tangent at x, follow these steps:

  1. Verify your x is a value between -1 and 1. If it is not, you cannot compute tanh inv for this x!
  2. Compute 1 + x and 1 - x.
  3. Perform the division (1 + x)/(1 - x).
  4. Find the natural logarithm of the result.
  5. Divide by 2. That's it!

To summarize, the formula for the arc hyperbolic tangent function reads:

artanhx=12ln1+x1x\operatorname{artanh} x = \tfrac 12\ln\frac{1+x}{1-x}

How to use this tanh calculator?

To use our hyperbolic tangent calculator, you only need to fill in the field x, and the value of tanh(x) will appear immediately. It couldn't be any easier, really.

If you want to find the inverse of tanh, that is, the arc hyperbolic tangent, you need to use the calc in reverse. That is, fill in the field tanh(x), and the value in x is exactly the value of artanh(x). Be careful! As we've explained above, the valid values of the inverse of tanh are the numbers between -1 and 1!

💡 Do you need other hyperbolic functions as well? Hit the advanced mode button at the bottom of the tanh calculator and they will appear :)

Omni tools for hyperbolic functions

Satisfied with the tanh calculator? Eager to learn more? Omni features a mini-collection of tools dedicated to hyperbolic functions:

FAQ

What is the derivative of tanh?

The derivative of the hyperbolic tangent is the square of the sech function. In fact, we have the following relationships: tanh'(x) = 1 - tanh2(x) = 1/cosh2(x) = sech2(x).

How do I get tanh in a calculator?

To compute tanh(x) with a basic calculator:

  1. Make sure your calculator can perform exponentiation.
  2. Compute exp(x). Store the result at every step - use the memory of your calculator or just a piece of paper.
  3. Compute exp(-x).
  4. Compute (exp(x) - exp(-x)) / (exp(x) + exp(-x)).
  5. That's it! You can use an online tanh calculator to verify your result.

What is the value of tanh 0?

The answer is 0. You can read this value from the graph of tanh x as well as conclude it from the fact that tanh is an odd function, i.e., it satisfies tanh(-x) = -tanh(x). Plugging in x = 0, we get tanh(0) = -tanh(0), which immediately gives tanh(0) = 0, as claimed.

Is tanh the same as arctan?

No, cosh stands for the hyperbolic cosine function, which is different from (yet related to, in some sense) the standard cosine function (cos). The notation cos-1 is a bit ambiguous and may denote, depending on the context, the inverse cosine function (arccos(x)) or the multiplicative inverse (1/cos(x)). Neither of them, however, is the same as cosh!

Anna Szczepanek, PhD
tanh graph
x
tanh(x)
For other hyperbolic functions, hit the Advanced mode button below.
Check out 40 similar algebra calculators 🔡
Absolute value equationAbsolute value inequalitiesAdding and subtracting polynomials… 37 more
People also viewed…

Hilbert's hotel paradox

Use Hilbert's hotel paradox calculator to learn how to accommodate an infinite number of guests.

Ideal egg boiling

Quantum physicist's take on boiling the perfect egg. Includes times for quarter and half-boiled eggs.

Prime factorization

Discover the prime factors as well the factor tree of any integer effortlessly with our Prime Factorization Calculator.

Sleep

The sleep calculator can help you determine when you should go to bed to wake up happy and refreshed.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service