The Excel TANH function returns the hyperbolic tangent of a number, equal to SINH(x)/COSH(x). The argument is a plain number, and the result always lies between −1 and 1.
Syntax
| Argument | Description | |
|---|---|---|
number | Required | Any real number. TANH is bounded: its result always falls strictly between -1 and 1. |
How to use it
The hyperbolic tangent is the ratio TANH(x) = SINH(x) / COSH(x). There is no degree-vs-radian issue — you pass a plain number:
TANH is an odd function and is bounded: as x grows it flattens toward 1, and toward -1 for large negative x. Its inverse is ATANH.
The S-curve. TANH's smooth squash from -1 to 1 makes it a classic activation function in neural networks and a handy way to map any number into a fixed range.
Try it: interactive demo
Pick a TANH example to see the formula and its result.
Practice workbook
Frequently asked questions
What is the hyperbolic tangent?
TANH(x) = SINH(x)/COSH(x), equivalent to (e^x - e^-x)/(e^x + e^-x). The result always lies strictly between -1 and 1.Does TANH use degrees or radians?
Why does TANH never quite reach 1?
What is the inverse of TANH?
ATANH (inverse hyperbolic tangent) returns the number whose hyperbolic tangent is a given value; its argument must be strictly between -1 and 1.Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class