TAN Function

Excel Functions › Math & Trig

All versions Math & Trig

The Excel TAN function returns the tangent of an angle. Excel measures angles in radians, so degrees must be converted with RADIANS or π first.


Quick answer:
=TAN(RADIANS(45)) tangent of 45 degrees = 1

Syntax

=TAN(number)
ArgumentDescription
numberRequiredThe 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(RADIANS(45)) // 45 deg = 1
=TAN(0) // = 0
=TAN(PI()/4) // pi/4 radians = 1

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

Live demo

Pick a TAN example to see the formula and its result.

Result:

Practice workbook

📊
Download the free TAN practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Why does TAN(45) not give 1?
Excel reads the argument as radians, so =TAN(45) is the tangent of 45 radians (about 1.62). For 45 degrees use =TAN(RADIANS(45)).
What happens at 90 degrees?
Tangent is mathematically undefined at 90° (and 270°) because cosine is zero there. Excel returns a very large finite number instead of an error, caused by floating-point rounding of π.
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?
Cotangent is the reciprocal of tangent: =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

Related functions: SIN · COS · COT · ATAN · RADIANS · DEGREES