ID EN
#Trigonometry

TAN

Excel Functions

Get the tangent of an angle

Syntax

EXCEL
=TAN(number)

Arguments

Parameter Description
number The angle in radians for which you want the tangent.

Return Value

The tangent value.

Details

The TAN function returns the tangent of an angle provided in radians. For example, given the π/4 as input, the function returns 1.0 as output. To supply an angle in degrees, use the radians function. In math, the tangent of an angle is defined as the ratio of the opposite side to the adjacent side of a right triangle. The definition of tangent is extended to all angles by defining the function in terms of the angle formed by a point on the unit circle. The plot below visualizes the output of tangent for angles between -π and π. The red lines represent vertical asymptotes where the function diverges to positive and negative infinity.

Examples

Example 1

The TAN function returns the tangent of an angle provided in radians. For example, given the π/4 as input, the function returns 1.0 as output.

EXCEL
=TAN(PI()/4) // Returns 1
Example 2

To supply an angle in degrees, use the radians function.

EXCEL
=TAN(RADIANS(45)) // Returns 1
Explanation

This is because the tangent function is likely defined in terms of the functions sine and cosine like this:

EXCEL
=SIN(a)/COS(a) // equivalent to TAN(a)
Explanation

It's reasonable to expect that the output of cosine for the angle π/2 should be zero, meaning you would get a division by zero error for tangent at th

EXCEL
=COS(PI()/2) // returns 6.12323E-17 instead of zero
Explanation

As a result, the tangent of π/2 does not return an error and instead returns a very large value.

EXCEL
=TAN(PI()/2) // returns 1.63312E+16

See Also

SIN COS ATAN ATAN2