Excel ATAN2 Function
The Excel ATAN2 function returns arctangent (inverse tangent) of a given (x, y) coordinates. It returns result expressed in radians.
The ATAN2 function is a built-in function in Excel that is categorized as a Math/Trig Function. It can be used as a worksheet function in Excel. As a worksheet function, the ATAN2 function can be used as part of a formula in a worksheet cell.
Syntax
ATAN2(x_num, y_num)
Parameters
x_num |
Required. Specify x coordinate of the input point. |
y_num |
Required. Specify y coordinate of the input point. |
Return Value
Returns the arctangent of a given (x, y) coordinates.
Notes
- To convert the result in degrees, multiply it by 180/PI() or use the DEGREES function.
- If the argument is a non-numeric value, ATAN2 returns #VALUE! error.
Example: Using as Worksheet Function
The example below shows how to use the ATAN2 function as worksheet function.
Based on the Excel spreadsheet above, the output of the following worksheet formula will be:
=ATAN2(B5,C5) Result: 0.927295218 =ATAN2(B6,C6) Result: -0.927295218 =ATAN2(B7,C7) Result: 2.214297436 =ATAN2(B8,C8) Result: -2.214297436 =ATAN2(B9,C9) Result: 0 =ATAN2(B10,C10) Result: 1.570796327 =ATAN2(B11,C11) Result: 0.785398163
Example: Convert Result to Degrees
To get the result from ATAN2 function in degrees, the result can be multiplied by 180/PI(). Alternatively, the angle can be converted into degrees by using DEGREES function. For example, to convert 2 radians into degrees, the following formula can be used:
=2 * 180/PI() Result: 114.591559026165 =DEGREES(2) Result: 114.591559026165
Example: PI() Function
A half-rotation (180°) in radians is equal to 3.142.. or 𝜋. A full-rotation (360°) in radians is equal to 6.283.. or 2𝜋. To get the value of 𝜋, Excel PI function can be used.
=PI() Result: 3.14159265358979 =DEGREES(PI()) Result: 180
❮ Excel Functions