# Documentation/Calc Functions/TAN

TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate

## Function name:

TAN

## Category:

Mathematical

## Summary:

Calculates the trigonometric tangent (tan) of an angle expressed in radians.

## Syntax:

TAN(**Number**)

## Returns:

Returns a real number that is the trigonometric tangent of the specified angle.

## Arguments:

**Number** is a real number, or a reference to a cell containing that number, that is the angle in radians whose trignometric tangent is to be calculated.

- If
**Number**is non-numeric, then TAN reports a #VALUE! error.

## Additional details:

If your angle is expressed in degrees, either multiply by PI()/180 or use the RADIANS function to convert to radians.

The formula for the trigonometric tangent of x is:

[math]\displaystyle{ \tan(x)~=~\frac{1}{\cot(x)}~=~\frac{\sin(x)}{\cos(x)} }[/math]

Mathematically, the tangent of any odd multiple of π/2, i.e. {......-3π/2, -π/2, π/2, 3π/2.....} is undefined. However, because of the inherent inaccuracy in representing π numerically, TAN does not report errors for arguments close to these values. You should be aware that TAN will return large positive or negative results for odd multiples of π/2.

The figure below illustrates the function TAN.

## Examples:

Formula | Description | Returns |
---|---|---|

=TAN(1) | Trigonometric tangent of 1 radian. | 1.5574077246549 |

=TAN(D1) where cell D1 contains the number -0.5. | Trigonometric tangent of -½ radian. | 0.54630248984379 |

=TAN(PI()/4) | Trigonometic tangent of π/4 radians. | 1 |

=TAN(RADIANS(45)) | Trignometric tangent of 45°, after first converting the angle from degrees to radians. | 1 |

=DEGREES(ATAN(TAN(RADIANS(60))) | An angle of 60° is converted to radians, its tangent is taken, then the inverse tangent of that value is calculated, and finally the result is converted back to degrees. | 60 |

## Related LibreOffice functions:

## ODF standard:

## Related (or similar) Excel functions:

TAN