TAN function
The TAN function in Excel is used to calculate the tangent of a given angle. The tangent is a trigonometric function that is typically used in geometry, physics, and engineering to relate an angle of a right triangle to the ratio of the opposite side to the adjacent side.
In Excel, the TAN function expects the angle to be provided in radians.
Syntax
=TAN(number)
Parameters
- number (required): The angle in radians for which you want to find the tangent. If the angle is provided in degrees, it needs to be converted to radians first (using the
RADIANSfunction or by multiplying by π/180).
Key Points
- Radian Input: The
TANfunction works with angles expressed in radians, not degrees. If your angle is in degrees, use theRADIANSfunction to convert it to radians before applying theTANfunction. - Negative Angles: The function also works with negative values for angles, returning the correct negative tangent for the input.
Examples
- Basic Example with Radians: To calculate the tangent of an angle of 1 radian:
=TAN(1)Result: The tangent of 1 radian is approximately 1.5574.
- Using Degrees (with conversion to radians): To calculate the tangent of 45 degrees:
=TAN(RADIANS(45))Result: The tangent of 45 degrees is 1 (since the tangent of 45° is 1 in trigonometry).
- Using a Reference Cell: If cell A1 contains the angle in radians (e.g., 0.5), the formula:
=TAN(A1)Will return the tangent of the angle in cell A1.
- Using Degrees with Multiplication: To calculate the tangent of 60 degrees:
=TAN(60*PI()/180)This converts 60 degrees to radians and calculates the tangent. The result is approximately 1.732.
Notes
- Undefined Results: The tangent function is undefined for angles where the cosine is 0 (i.e., odd multiples of 90° or π/2 radians). For these angles, the function will return an error, such as
#DIV/0!.For example:
TAN(PI()/2)orTAN(90)will return#DIV/0!because the tangent of 90 degrees is undefined.
- Negative Angles: The tangent of a negative angle is negative. For example:
TAN(-45)will return-1, as the tangent of -45 degrees is -1.
Related Functions
SIN: Calculates the sine of an angle.COS: Calculates the cosine of an angle.TANH: The hyperbolic tangent function.RADIANS: Converts an angle from degrees to radians.DEGREES: Converts an angle from radians to degrees.
The TAN function is commonly used in various mathematical, engineering, and physics applications, especially when working with angles and trigonometric relationships.