Google Sheets TAN Function: Syntax, Examples & Tips

Returns the tangent of an angle given in radians.
Google Sheets
=TAN(angle)

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

On this page
  1. Parameters
  2. What Is TAN?
  3. Radians, Not Degrees
  4. Basic Examples
  5. Behaviour Near 90 Degrees
  6. Going the Other Way
  7. Common Use Cases
  8. Common Errors
  9. Tips and Best Practices
  10. Related Functions
  11. Example use case

Parameters

ParameterRequiredDescription
angleYesThe 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:

Google Sheets
=TAN(RADIANS(45))

or

Google Sheets
=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

Google Sheets
=TAN(PI()/4)

Returns approximately 1.

Tangent of an angle in degrees stored in a cell

Google Sheets
=TAN(RADIANS(A2))

Height from distance and angle of elevation

Google Sheets
=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

Google Sheets
=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:

Google Sheets
=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 — it is a different function.

SIN, COS, COT, ATAN, ATAN2, RADIANS, DEGREES, PI, and TANH.

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.

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.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

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