TANH Function

Excel 2007+

Summary

The Excel TANH function calculates the hyperbolic tangent of a given number, a key mathematical operation used in advanced calculations, engineering applications, and statistical modeling.

Syntax

TANH(number)

Parameters

Parameter Type Required Description
number Number Yes The real number value to compute the hyperbolic tangent for

Using the TANH Function

TANH computes the hyperbolic tangent using the formula (e^x - e^-x) / (e^x + e^-x), producing results between -1 and 1. It's commonly used in physics, engineering, and financial modeling where hyperbolic functions appear naturally.

Common TANH Examples

Basic TANH Examples

=TANH(-2)

Hyperbolic tangent of -2 returns approximately -0.964028

Zero Input

=TANH(0)

Hyperbolic tangent of 0 returns exactly 0

Positive Value

=TANH(0.5)

Hyperbolic tangent of 0.5 returns approximately 0.462117

Cell Reference

=TANH(A1)

Calculates hyperbolic tangent of value in cell A1

Frequently Asked Questions

TANH returns values between -1 and 1 for all real number inputs.

Yes, TANH works with negative numbers and returns negative results approaching -1.

TAN is the circular tangent (periodic), while TANH is the hyperbolic tangent (bounded between -1 and 1).

Common Errors and Solutions

#VALUE!

Cause: Non-numeric argument provided

Solution: Ensure the input is a valid number

#NUM!

Cause: Input is not a real number (in some cases)

Solution: Verify input contains only numeric values

Notes

  • TANH approaches 1 as input goes to positive infinity
  • TANH approaches -1 as input goes to negative infinity
  • TANH(0) = 0 exactly
  • Related hyperbolic functions: SINH, COSH

Compatibility

Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365

Not available in: Excel 2003 and earlier

Content last reviewed: December 11, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+