TANH in Excel: Build a Bounded Signed Response
Use Excel TANH with signed controls, explicit response scaling, hyperbolic identities and finite-precision saturation cautions.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: TANH returns the hyperbolic tangent. =TANH(1) is expected to return approximately 0.761594156, and =TANH(0) returns 0. It is not the circular tangent of an angle.
Availability and version history
- Introduced: original introduction release and first numeric build are not established by the official history reviewed.
- Availability: the official TANH reference lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
- Checked: October 14, 2026. Documentation and independently calculated finite-value examples; no native Excel execution or broader platform certification.
Syntax and real-valued behavior
=TANH(number)
Microsoft requires one real-number argument. Mathematically, TANH(x)=SINH(x)/COSH(x). For finite real x, the ideal result is strictly between −1 and 1 and has the same sign as x; zero maps to zero.
Those mathematical limits do not promise that every extreme finite input remains distinguishable from an endpoint in floating-point storage. A displayed or rounded result can reach 1 or −1. Use the dedicated function without claiming an untested precision guarantee.
The examples use English names and decimal points. Do not convert degrees to radians unless an independently specified model actually requires that conversion; the hyperbolic argument is not an ordinary circular angle.
Example 1: compare a signed input range
Enter −2, −1, 0, 1, 2 in A2:A6. Put =TANH(A2) in B2 and fill down. Expected outputs, approximately:
| Input | TANH |
|---|---|
| −2 | −0.964027580 |
| −1 | −0.761594156 |
| 0 | 0 |
| 1 | 0.761594156 |
| 2 | 0.964027580 |
Increasing the positive input from one to two increases the output, but does not double it. The function compresses large magnitudes toward its bounds rather than applying a fixed multiplier.
Example 2: verify the hyperbolic ratio
=SINH(1)/COSH(1)
=TANH(1)
Both expected results are approximately 0.761594156. SINH and COSH are the hyperbolic partners. Replacing them with SIN and COS instead gives circular tangent and changes the calculation.
Another mathematical representation is (EXP(2*x)-1)/(EXP(2*x)+1). At x=0.5 it gives approximately 0.462117157. This identity explains the relationship, but a hand-built exponential expression can overflow or lose precision where a dedicated implementation uses a more suitable calculation.
Advanced example: define a response with a stated maximum scale
Suppose a constructed model specifies response y=50*TANH(x/2). Enter x values −4, −2, 0, 2, 4 in D2:D6. In E2 enter:
=50*TANH(D2/2)
Fill down. Expected outputs are approximately −48.201379004, −38.079707798, 0, 38.079707798, 48.201379004. The output scale is 50, while the divisor two controls the input scale.
These parameters define the example; they are not recommended settings for an unknown real process. Preserve the original x values and label the transformed output so readers do not mistake the compressed values for the original measurements.
Advanced example: solve an ordinary inverse algebraically
For a permitted target ratio r strictly between −1 and 1, the mathematical inverse is 0.5*LN((1+r)/(1-r)). With r=0.6:
=0.5*LN((1+0.6)/(1-0.6))
Expected input: approximately 0.693147181. Applying TANH to that unrounded value reconstructs approximately 0.6. LN is the natural logarithm, not base-ten LOG10.
The endpoints r=1 and r=−1 are excluded from this inverse expression. Do not take a rounded endpoint from a saturated forward calculation and assume it preserves the finite original input. Multiple sufficiently large inputs may become indistinguishable at the chosen numerical or display precision.
Troubleshooting
Check the input scale and distinguish a hyperbolic response from a percent display or circular tangent. A stored value of 0.5 and a stored value of 50 are not interchangeable, even if a percentage format makes their labels easy to confuse.
Use zero, a positive control and its negative before extending the model. No native overflow threshold, endpoint-saturation boundary or exhaustive coercion table is certified by these independent finite-value calculations.
References and verification
Numerical outputs are independent mathematical expectations, rounded where stated. Product-specific syntax and scope come from the cited reference. Native error/coercion matrices and extreme-value precision remain untested.