# Google Sheets TANH Function: Syntax, Examples & Tips

- URL: https://betteranalyst.com/google-sheets/tanh-function
- Author: Better Analyst

Formula Bot is now Better Analyst—same account, more powerful analysis.Formula Bot is now Better Analyst—same account and workflows, with more powerful analysis, dashboards, and automation.

[Learn what changed](https://betteranalyst.com/formula-bot-is-now-better-analyst)

Returns the hyperbolic tangent of any real number.

```
=TANH(value)
```

Generate FormulaExplain Formula

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

Describe the TANH you need in plain EnglishGenerate Formula

## Parameters

| Parameter | Required | Description |
| - | - | - |
| **value** | Yes | Any real number to calculate the hyperbolic tangent of. Unlike TAN, this is not an angle. |

## What Is TANH?

TANH returns the hyperbolic tangent of a number. It is defined as

`TANH(x) = SINH(x) / COSH(x) = (e^x − e^−x) / (e^x + e^−x)`

Despite the similar name, TANH is not a trigonometric function of an angle — it belongs to the hyperbolic family (SINH, COSH, TANH), which is built from the exponential function. There is no need to convert to radians.

## Key Properties

- **Output range**: the result is always strictly between −1 and 1.
- **Zero in, zero out**: `TANH(0)` is 0.
- **Odd function**: `TANH(-x) = -TANH(x)`.
- **Saturation**: as x gets large, TANH approaches 1; as x gets very negative, it approaches −1. Around |x| > 20 the result rounds to exactly ±1 in Sheets.
- **Near zero it is almost linear**: for small x, TANH(x) ≈ x.

This S-shaped curve is what makes TANH useful — it squashes any input into a bounded range while preserving the sign and ordering.

## Basic Examples

### Hyperbolic tangent of a number

```
=TANH(1)
```

Returns approximately 0.7616.

### Large values saturate

```
=TANH(5)
```

Returns approximately 0.9999.

### Negative input

```
=TANH(-0.5)
```

Returns approximately −0.4621.

### Apply to a column

```
=ARRAYFORMULA(TANH(B2:B100))
```

## Practical Uses

### Squashing scores into a bounded range

If you have unbounded scores (for example, net sentiment or z-scores) and want them between −1 and 1 without hard clipping, TANH gives a smooth result:

```
=TANH(B2 / 10)
```

Dividing by a scale factor controls how quickly values saturate.

### Neural network activations

TANH is a classic activation function. If you are prototyping a tiny model or teaching how one works in a spreadsheet, you can compute a neuron's output with:

```
=TANH(SUMPRODUCT(B2:D2, $B$10:$D$10) + $E$10)
```

### Inverse: ATANH

To reverse the operation, use ATANH, which accepts values strictly between −1 and 1:

```
=ATANH(TANH(0.8))
```

returns 0.8. ATANH is also the Fisher transformation used to normalise correlation coefficients: `=ATANH(CORREL(A2:A50, B2:B50))`.

### Converting to a 0–1 scale

The logistic (sigmoid) function is closely related: `(TANH(x/2) + 1) / 2` equals `1 / (1 + EXP(-x))`.

## Common Use Cases

- **Data science and ML teaching**: Activation functions.
- **Statistics**: Back-transforming Fisher z values (`=TANH(z)` returns a correlation).
- **Physics**: Velocity of falling objects with drag, magnetisation models.
- **Score normalisation**: Soft-capping outliers.

## Common Errors

- **Confusing TANH with TAN**: TAN works on angles in radians and has asymptotes; TANH works on any number and is bounded. They give very different results.
- **#VALUE!**: The input is text that isn't numeric.
- **ATANH of ±1**: When reversing, ATANH(1) and ATANH(−1) return #NUM! because the result would be infinite.

## Tips and Best Practices

- Scale your input before applying TANH so the useful range of your data falls roughly between −3 and 3, where the curve is most responsive.
- Round results for presentation; the raw output has many decimal places.
- Use FISHERINV as an alternative name when back-transforming Fisher z values — it computes the same thing as TANH.

## Related Functions

SINH, COSH, ATANH, [TAN](https://betteranalyst.com/google-sheets/tan-function), EXP, FISHER, and FISHERINV.

## Example use case

A data analyst averaging correlation coefficients across several studies converts each r to a Fisher z with =ATANH(B2), averages the z values, and converts the average back to a correlation with =TANH(D1) — a statistically sounder approach than averaging r directly.

## Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

[Create Free Account](https://betteranalyst.com/signup)[Try Formula Generator](https://betteranalyst.com/excel-ai)

## Google Sheets how-to guides

- [How To Unprotect Google Sheets](https://betteranalyst.com/google-sheets/how-to-unprotect-google-sheets)
- [How To Wrap Text In Google Sheets](https://betteranalyst.com/google-sheets/how-to-wrap-text-in-google-sheets)
- [Google Sheets Conditional Formatting](https://betteranalyst.com/google-sheets/google-sheets-conditional-formatting)
- [How To Add A Column In Google Sheets](https://betteranalyst.com/google-sheets/how-to-add-a-column-in-google-sheets)
- [How To Alphabetize In Google Sheets](https://betteranalyst.com/google-sheets/how-to-alphabetize-in-google-sheets)
- [How To Autofit In Google Sheets](https://betteranalyst.com/google-sheets/how-to-autofit-in-google-sheets)
- [How To Calculate Percentage In Google Sheets](https://betteranalyst.com/google-sheets/how-to-calculate-percentage-in-google-sheets)
- [How To Combine Two Columns In Google Sheets](https://betteranalyst.com/google-sheets/how-to-combine-two-columns-in-google-sheets)

## Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

## Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

1. [01ChatGPTOpen a balanced comparison prompt in ChatGPT.](https://chatgpt.com/?prompt=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
2. [02ClaudeOpen the same research prompt in Claude.](https://claude.ai/new?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
3. [03PerplexityResearch the comparison with linked web sources.](https://www.perplexity.ai/search?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.
