A to Z of Excel Functions: the ATAN2 Function
9 September 2016
Welcome back to our regular A to Z of Excel Functions blog. Today we look at the ATAN2 function.
The ATAN2 function
You see that bronzed figure on the beach and you think, maybe I should get ATAN2. Yes, this function returns the arctangent, or inverse tangent, of the specified x- and y-coordinates. The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a point with coordinates (x_num, y_num). The angle is given in radians between - π and π, excluding - π.
The ATAN2 function employs the following syntax to operate:
The ATAN2 has the following arguments:
- x_num: this is required and represents the x-coordinate of the point
- y_num: this is also required and represents the y-coordinate of the point.
It should be further noted that:
- A positive result represents an anti-clockwise angle from the x-axis; a negative result represents a clockwise angle
- ATAN2(a,b) equals ATAN(b/a), except that a can equal 0 in ATAN2
- If both x_num and y_num are 0, ATAN2 returns the #DIV/0! error value
- To express the arctangent in degrees, multiply the result by 180/PI( ) or use the DEGREES function.
Please see my example below:
We’ll continue our A to Z of Excel Functions soon. Keep checking back – there’s a new blog post every other business day.