TAN
Calculate the tangent of an angle (in radians) with Excel's TAN function.
Spreadsheet editor
Spreadsheet editor
Syntax
=TAN(number)
Returns: Number Arguments
| Argument | Required | Description |
|---|---|---|
| number | Yes | The angle in radians for which you want the tangent. |
About
If your angle is in degrees, convert it first. You can multiply by PI()/180 or use the RADIANS function. For example, =TAN(RADIANS(45)) returns 1 because the tangent of 45 degrees is exactly 1.
TAN pairs well with other trig functions. Use SIN and COS for sine and cosine values, or ATAN and ATAN2 to work backwards from a tangent to an angle.
Examples
Height of a building from distance and angle
Spreadsheet editor
Passing degrees instead of radians
Spreadsheet editor
Values close to 90 degrees
Spreadsheet editor
Watch out for
Passing degrees instead of radians
You type =TAN(45) expecting the tangent of 45 degrees, but TAN treats 45 as radians and returns a completely different result.
→ Wrap the value with RADIANS first: =TAN(RADIANS(45)). Or multiply by PI()/180.
Unexpected large numbers near 90 degrees
At angles close to 90 degrees (PI/2 radians) the tangent grows very large, which can look like an error in your spreadsheet.
→ This is normal math behavior. The tangent approaches infinity at exactly 90 degrees. If you need to handle these edge cases, add an IF check before the TAN call.
Confusing TAN with TANH
Using TANH by mistake returns the hyperbolic tangent, which is a different calculation entirely.
→ Use TAN for standard trigonometric tangent. TANH is for hyperbolic tangent, which is used in different contexts like engineering curves.