=TAN(angle)One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
| Parameter | Required | Description |
|---|---|---|
| angle | Yes | The angle to find the tangent of, in radians. Convert degrees with RADIANS(degrees) or degrees*PI()/180. |
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).
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.
=TAN(PI()/4)Returns approximately 1.
=TAN(RADIANS(A2))=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.
=TAN(RADIANS(A2))Converts a slope angle into rise-over-run. Multiply by 100 for percent grade: =TAN(RADIANS(A2))*100.
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).
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))=ROUND(TAN(RADIANS(A2)), 4)).SIN, COS, COT, ATAN, ATAN2, RADIANS, DEGREES, PI, and TANH.
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.
Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.
Browse our complete library of Google Sheets formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.