TAN

Return the tangent of an angle given in radians — rise over run.

Syntax

TAN(number)
Argument Required Description
number Required The angle, in radians.

Examples

Every example below was executed against VisiGrid engine 0.54.0 — not transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.

Formula Result Notes
=TAN(0) 0
=TAN(RADIANS(45)) 1.00 At 45 degrees the rise equals the run.
=100*TAN(RADIANS(5)) 8.75 A 5 degree slope rises 8.75 over 100 horizontal.

Rise over run

The tangent of an angle is the slope of a line at that angle, which makes TAN the bridge between an angle and a gradient. To go the other way — from a gradient to an angle — use ATAN:

=DEGREES(ATAN(1))  → 45

Ninety degrees

A vertical line has no slope, and the tangent of 90 degrees is undefined. Because PI()/2 is not stored exactly, TAN returns an enormous number there rather than an error — the same as Excel. Treat any result in the quadrillions as “vertical”.

Excel compatibility

Matches Excel. Angles are in radians.

Related functions

Last updated