ATAN2 Function

Office 2013 and later

Last modified: March 09, 2015

Applies to: Office 2013 | Visio 2013

In this article
Syntax
Remarks
Example 1
Example 2
Example 3

Returns the angle between the vector represented by x,y and the direction of the x-axis. The result is a number in the current unit of measure for angles.

ATAN2(y,x)

Parameters

Name

Required/Optional

Data Type

Description

y

Required

Numeric

The y-value of the point.

x

Required

Numeric

The x-value of the point.

The arctangent is the angle measured counterclockwise from the positive x -axis to a line that intersects the origin (0,0) and the point represented by x and y. In Microsoft Visio, ATAN2(0,0) returns 0. To force the result of ATAN2 into a different angular measurement, use the DEG or RAD function.

The ATAN2 function is the antifunction of the TAN function. The ATAN2 function returns the angle whose angle is equal to y divided by x. If ATAN2(y,x) represents an angle in a right triangle, y is the "opposite side" and x is the "adjacent side," so the function could be written as ATAN2(opposite,adjacent).

ATAN2(1.25,2.25)

Returns 29.0456 deg

ATAN2(1,SQRT(3))

Returns 30 deg

ATAN2(1,1)

Returns 45 deg

Show: