The Excel TAN function returns the tangent of an angle. Excel measures angles in radians, so degrees must be converted with RADIANS or π first.
Syntax
| Argument | Description | |
|---|---|---|
number | Required | The angle in radians whose tangent you want. Convert degrees with RADIANS(deg) or deg*PI()/180. |
How to use it
The most common mistake is feeding TAN a number of degrees. Excel expects radians, so wrap the angle in RADIANS():
TAN equals SIN divided by COS, and pairs with ATAN for the inverse (which returns an angle in radians — wrap it in DEGREES to read it back as degrees).
Tangent is undefined at 90 degrees. Because COS(90°) is zero, the true tangent there is infinite. Excel can't return infinity exactly: =TAN(RADIANS(90)) gives a huge finite number (about 1.6E+16) from floating-point rounding, not a clean result.
Try it: interactive demo
Pick a TAN example to see the formula and its result.
Practice workbook
Frequently asked questions
Why does TAN(45) not give 1?
=TAN(45) is the tangent of 45 radians (about 1.62). For 45 degrees use =TAN(RADIANS(45)).What happens at 90 degrees?
What is the inverse of TAN?
ATAN returns the angle (in radians) whose tangent is a given value. Use ATAN2 when you have separate x and y coordinates and need the correct quadrant.How do I get the cotangent from TAN?
=1/TAN(x), or use the dedicated COT function in Excel 2013 and later.Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class