Category: FUNCTION | Updated: 2026-11-22
[TAN Function] How to Calculate the Tangent of an Angle (in Radians)
Syntax
=TAN(angle)
- angle: The angle, in radians, for which you want to calculate the tangent.
Example Table
Examples of finding the tangent from degrees and calculating height from horizontal distance.
| Angle (Degrees) | Horizontal Distance (m) | Formula | Output | Explanation |
|---|---|---|---|---|
| 0 | - | =TAN(RADIANS(A2)) |
0 | tan(0°) = 0 |
| 45 | - | =TAN(RADIANS(A3)) |
1 | tan(45°) = 1 (100% grade) |
| 30 | 10 | =B4*TAN(RADIANS(A4)) |
5.773502692 | Height at 10 m distance and 30° elevation |
Common Errors and Caveats
- #VALUE! error: Passing a text string as the argument results in an error.
- Singularities at 90° and 270°:
TAN(RADIANS(90))does not throw an error; instead, it returns a huge number (approx. 1.63×10¹⁶). If your angle might be 90° or 270°, consider handling it beforehand with anIFfunction.
Frequently Asked Questions
Q. Can I use the TAN function to calculate the slope or height of a building or ramp?
A. Yes. If you know the horizontal distance and the angle in degrees, you can calculate the height with "=horizontal_distance * TAN(RADIANS(angle))".
Q. What happens if you try to calculate the tangent of 90 degrees?
A. Mathematically, tan(90°) is undefined (approaching infinity), but in Google Sheets, due to the finite precision of pi, it returns an extremely large number such as 1.63312E+16.