What artanh returns
The hyperbolic tangent is tanh(x) = sinh(x)/cosh(x). It squashes the entire real line into the open interval (−1, 1), approaching ±1 as x → ±∞ but never reaching them.
Artanh undoes that squash. Because tanh never actually reaches ±1, those two values are excluded from the inverse's domain — and the inverse's output covers the whole real line, growing without bound as the input approaches them.
- Domain: −1 < x < 1, open at both ends.
- Range: all real numbers.
- Odd symmetry: artanh(−x) = −artanh(x).
- Derivative: 1/(1 − x²), which is exactly the derivative of arctan with the sign of x² flipped.
How to calculate it by hand
- Form the ratio. (1 + x)/(1 − x). For x = 0.5 that is 1.5/0.5 = 3.
- Take the natural logarithm. ln(3) ≈ 1.09861229.
- Halve it. 0.54930614.
The halving is easy to forget. A result that is exactly twice the expected value almost always means the ½ was dropped.
This is the logit. If you set p = (1 + x)/2, then artanh(x) = ½ ln(p/(1 − p)) — half the logit of p. The two functions differ only by a linear rescaling, which is why the logistic sigmoid and tanh have the same S-shape.
Worked examples
artanh(0)
Zero, because tanh(0) = 0. The curve crosses the origin with slope 1, its maximum.
artanh(0.5)
0.54930614. Compare with the logit of p = 0.75, which is ln(3) ≈ 1.0986 — exactly double, as the identity predicts.
artanh(0.99)
2.64665241. The value is climbing steeply now: at x = 0.999 it reaches 3.8002, and it diverges as x → 1.
Standard values
| x | artanh(x) | Check: tanh of the result |
|---|---|---|
| −0.99 | −2.64665241 | −0.99 |
| −0.5 | −0.54930614 | −0.5 |
| 0 | 0 | 0 |
| 0.5 | 0.54930614 | 0.5 |
| 0.9 | 1.47221949 | 0.9 |
| 0.99 | 2.64665241 | 0.99 |
| 0.999 | 3.80020117 | 0.999 |
Where artanh is used
- Logistic regression — the logit link is artanh up to a factor of two, which is why coefficients are interpreted as changes in log-odds.
- Special relativity — rapidity is artanh(β) where β = v/c, so velocities add linearly in rapidity space.
- Signal processing — the Fisher z-transformation for correlation coefficients is artanh(r), used to build confidence intervals.
- Neural networks — tanh activations are inverted during gradient analysis to inspect pre-activation values.
Common mistakes
artanh(1) is not a large number. It is undefined — the logarithm diverges. Any tool that returns a finite value for x = 1 is silently clamping the input.
- Forgetting the factor of ½. The most common arithmetic slip with this function.
- Confusing artanh with arctan. Arctan is defined for all reals and returns an angle in (−90°, 90°); artanh is defined only inside (−1, 1) and returns an unbounded number.
- Using it on a correlation of exactly ±1. Perfect correlation sends the Fisher z to infinity.
Frequently asked questions
What is artanh(0.5)?
0.5493061443, which equals ½ln(3). Note that it is half the logit of 0.75, not the logit itself.
Why is artanh undefined at ±1?
Because tanh(x) approaches but never reaches ±1. The logarithm ln((1+x)/(1−x)) diverges as x → 1, so there is no finite answer.
Is artanh the same as arctan?
No. Arctan accepts every real number and returns an angle; artanh accepts only (−1, 1) and returns a real number that grows without bound near the edges.
How is artanh related to the logit function?
logit(p) = 2·artanh(2p − 1). The two are the same curve with a rescaling of both axes, which is why logistic regression and tanh networks behave so similarly.
How do I calculate artanh in Excel?
Use =ATANH(x). It returns #NUM! for |x| ≥ 1.
What is the derivative of artanh(x)?
1/(1 − x²). Compare with the arctangent derivative 1/(1 + x²) — the sign flip is the only difference.