ATAN

ATAN(number) returns radians from -pi/2 to pi/2; ATAN2 covers the full circle. Worked examples and the degree conversion. Matches Excel.

Syntax

ATAN(number)
Argument Required Description
number Required A tangent value — any number.

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
=ATAN(1) 0.79 π/4 radians.
=DEGREES(ATAN(1)) 45 A slope of 1 is 45 degrees.
=DEGREES(ATAN(-1/-1)) 45 A point down and to the left gives the same slope, so ATAN cannot tell it from up and to the right.

From a gradient to an angle

A road that climbs 8 metres every 100 has a gradient of 0.08. Its angle:

=DEGREES(ATAN(0.08))

Any number is a valid input, so unlike ASIN and ACOS, ATAN never returns #NUM!.

When to use ATAN2 instead

ATAN takes one number, a ratio, and a ratio has already lost the signs of the two values that made it. -1 divided by -1 is 1, the same as 1 divided by 1, so the angle comes back as 45 degrees when the point is really at -135. ATAN2 takes the two coordinates separately and returns the right quadrant. It also copes with a run of zero, which as a ratio would be a division by zero.

Excel compatibility

Matches Excel. Returns radians between -π/2 and π/2.

Related functions

Last updated