Math & Trig
TAN Function in Excel
Returns the tangent of an angle specified in radians.
Syntax
- =TAN(number)
Arguments
- number (required): Angle in radians
Examples
- =TAN(PI()/4) - Tangent of 45 degrees - Result: 1
- =TAN(RADIANS(45)) - Tangent of 45 degrees - Result: 1
TAN in reporting workflows
- Use absolute references when copying formulas across rows.
- For conditional totals see [SUMIF](/functions/sumif/) and [SUMIFS](/functions/sumifs/).
- Filtered lists may need [SUBTOTAL](/functions/subtotal/) instead of SUM on visible cells only.
Common errors
- Undefined at 90, 270 degrees etc.
- Argument must be in radians
Use cases
- Slope calculations
- Angle problems
- Engineering
Frequently asked questions
- How do I calculate slope using TAN? Slope = TAN(angle). If a ramp rises at 30°: =TAN(RADIANS(30)) = 0.577, meaning it rises 0.577 units for every 1 unit horizontal. Conversely, to find angle from slope: =DEGREES(ATAN(slope)).
- Why does TAN return very large numbers at certain angles? TAN approaches infinity at 90°, 270°, etc. (where COS = 0). At exactly 90°, TAN is undefined. Excel returns very large numbers near these angles. This is mathematically correct - the tangent line becomes vertical.
- What is the relationship between TAN, SIN, and COS? TAN(x) = SIN(x)/COS(x). This is why TAN is undefined when COS = 0. You can verify: =SIN(RADIANS(45))/COS(RADIANS(45)) equals =TAN(RADIANS(45)), both returning 1.
Editorial review
- Reviewed by Excel.Directory Editorial Team. Updated May 2026.