TANH Function in Excel Article byTanuj Kumar TANH Function in Excel

In trigonometry we have a term called hyperbolic tangent which is the ratio of the hyperbolic sine and cosine functions, to calculate this mathematical operation in excel we have an inbuilt trigonometric function known as TANH and it takes single argument as an input.

TANH function is categorized as Math, or Trig function in excel returns the hyperbolic tangent function of the given number. So you can use this function to calculate the hyperbolic tangent function of a number in Excel.

This function is available in all versions of excel, i.e., Excel 2016, Excel 2013, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000, and Excel 2011 for Mac.

Syntax It has only one compulsory parameter, i.e., number.

Compulsory Parameter:

• number: Number is any real number or the numeric value used to determine the hyperbolic tangent function.

Remark

The formula for the TANH (Hyperbolic tangent) is:

TANH(x) =SINH(x)/COSH(x)

How to Use TANH Formula in Excel?

You can download this TANH Function Excel Template here – TANH Function Excel Template

Example #1

Let’s consider a set of angles (in radian) 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, and 5 to understand the working on TANH.

Now apply the TANH in the cell, as shown in the below table. TANH will return the hyperbolic tangent function of all the supplied values as 0, 0.46, 0.76, 0.91, 0.96, 0.99, 1.00, 1.00, 1.00 and 1.00. Example #2

In this TANH example, we take the sample of negative angles (in radian) and then apply the TANH formula to them.

Let’s consider a set of positive integers -0.1, -0.5, -1, -1.5, -2, -2.5, -3, -3.5, -4 and -5 to understand the working on TANH. Now apply the TANH in cell as shown in the below table. TANH provides the hyperbolic tangent function as -0.10, -0.46, -0.76, -0.91, -0.96, -0.99, -1.00, -1.00, -1.00 and -1.00. Example #3

Suppose you have the angle in degree, then you have to convert the degree to radian by using the RADIAN function as shown in the below table than apply the TANH formula to calculate the hyperbolic tangent Function of the given angle. Example #4

Suppose you have the angle in degree, then you have to convert the degree to radian multiplying the degree angle to PI/180, as shown in the below table, then apply the TANH formula to calculate the hyperbolic tangent Function of the given angle. Example #5

Suppose the given angle is in degree and you want a hyperbolic tangent function in degree then you have to first convert the degree angle to radian by radian() function or multiplying it by PI()/180 and apply the TANH formula now out will be in radian at the end reverse the process and multiply the output angle 180/PI() to convert the output angle into the degree. TANH Function can be used as a VBA function.

Dim TANHnumber As Long

TANHnumber = Application.worksheetfunction.TANH(“0”)

Msgbox(TANHnumber) // Return the nearest TANH value in message box.

The output will be “0” and printed in the message box.

Things to Remember

• If the supplied number is a non-numeric value, then TANH will return the #VALUE! Error.
• The number is the angle in radians.
• If the number is in degrees, multiply it by PI/180 to convert it into radians.
• If you want the result in a degree, multiply the result by 180/PI.

Recommended Articles

This has been a guide to TANH Function in Excel. Here we discuss how to use TANH in excel along with examples and downloadable templates. You may also look at these useful functions in excel –

• 35+ Courses
• 120+ Hours