# Google Sheets TAN Function: Syntax, Examples & Tips

- URL: https://betteranalyst.com/google-sheets/tan-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 tangent of an angle given in radians.

```
=TAN(angle)
```

Generate FormulaExplain Formula

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

Describe the TAN you need in plain EnglishGenerate Formula

## Parameters

| Parameter | Required | Description |
| - | - | - |
| **angle** | Yes | The angle to find the tangent of, **in radians**. Convert degrees with RADIANS(degrees) or degrees\*PI()/180. |

## What Is TAN?

TAN returns the tangent of an angle. In a right-angled triangle the tangent of an angle is the length of the opposite side divided by the length of the adjacent side. TAN is one of the core trigonometric functions in Google Sheets alongside SIN and COS, and mathematically `TAN(x) = SIN(x) / COS(x)`.

## Radians, Not Degrees

The single most important thing to know about TAN is that it expects the angle in **radians**. A full circle is 2π radians (360°), so 45° is π/4 radians.

If your angles are in degrees, convert them first:

```
=TAN(RADIANS(45))
```

or

```
=TAN(45*PI()/180)
```

Both return 1 (displayed as 0.9999999999999999 or 1 depending on formatting, because of floating-point precision). Writing `=TAN(45)` instead treats 45 as radians and returns roughly 1.62 — a common source of wrong answers.

## Basic Examples

### Tangent of an angle in radians

```
=TAN(PI()/4)
```

Returns approximately 1.

### Tangent of an angle in degrees stored in a cell

```
=TAN(RADIANS(A2))
```

### Height from distance and angle of elevation

```
=B2 * TAN(RADIANS(C2))
```

If you stand B2 metres from a building and measure an angle of elevation of C2 degrees to the top, this returns the building's height above eye level.

### Slope from an angle

```
=TAN(RADIANS(A2))
```

Converts a slope angle into rise-over-run. Multiply by 100 for percent grade: `=TAN(RADIANS(A2))*100`.

## Behaviour Near 90 Degrees

The tangent is undefined at 90° (π/2 radians), 270° and so on, because the cosine is zero there. Because π/2 cannot be represented exactly in floating point, `=TAN(PI()/2)` may return an extremely large number rather than an error. Treat any enormous result as a sign you are at or near an asymptote.

TAN is periodic with a period of π, so `TAN(x)` equals `TAN(x + PI())`. It is also an odd function: `TAN(-x) = -TAN(x)`.

## Going the Other Way

To turn a tangent ratio back into an angle, use ATAN (result in radians, between −π/2 and π/2) or ATAN2, which takes x and y separately and returns the correct quadrant. Convert the result to degrees with DEGREES:

```
=DEGREES(ATAN(B2/A2))
```

## Common Use Cases

- **Surveying and construction**: Heights, roof pitch, ramp gradients.
- **Physics**: Resolving forces and projectile angles.
- **Engineering**: Converting between slope angles and percentages.
- **Graphics and games**: Field-of-view calculations.

## Common Errors

- **Wrong answer from degrees**: Forgetting RADIANS is by far the most common mistake.
- **Huge numbers**: Angles at or near 90° + k·180° give extremely large results instead of an error.
- **#VALUE!**: The angle is text that can't be read as a number.
- **Tiny rounding differences**: Results such as 0.9999999999999999 are normal floating-point artefacts; round the output if needed.

## Tips and Best Practices

- Always store whether a column holds degrees or radians in its header.
- Wrap results in ROUND for display (`=ROUND(TAN(RADIANS(A2)), 4)`).
- Use ATAN2 rather than ATAN when you need a full 360° angle from coordinates.
- For the hyperbolic tangent, use [TANH](https://betteranalyst.com/google-sheets/tanh-function) — it is a different function.

## Related Functions

SIN, COS, COT, ATAN, ATAN2, RADIANS, DEGREES, PI, and [TANH](https://betteranalyst.com/google-sheets/tanh-function).

## Example use case

A contractor needs the height of a wall from ground measurements. Standing 12 metres away, the angle of elevation to the top is 35 degrees. =12\*TAN(RADIANS(35)) returns about 8.4 metres, which is added to eye height to get the total.

## 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 Lock Cells In Google Sheets](https://betteranalyst.com/google-sheets/how-to-lock-cells-in-google-sheets)
- [How To Make A Copy Of An Google Sheets Sheet](https://betteranalyst.com/google-sheets/how-to-make-a-copy-of-an-google-sheets-sheet)
- [How To Make A Graph In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-graph-in-google-sheets)
- [How To Make A Histogram In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-histogram-in-google-sheets)
- [How To Make A Line Graph In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-line-graph-in-google-sheets)
- [How To Make A Pie Chart In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-pie-chart-in-google-sheets)
- [How To Make A Table In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-table-in-google-sheets)
- [How To Merge Cells In Google Sheets](https://betteranalyst.com/google-sheets/how-to-merge-cells-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.
