Excel functions / Math
ATAN2 function
The angle, in radians, from the x-axis to the point (x, y). Unlike ATAN it knows which quarter of the circle the point is in.
Syntax
=ATAN2(x_num, y_num)
Arguments
x_num: The x-coordinate of the point. Note that x comes first.y_num: The y-coordinate of the point.
When to use it
ATAN2 gives the angle, in radians, from the x-axis to the point (x, y), anywhere around the circle. It turns map coordinates into a bearing. Note that x comes first, unlike some other programs.
Examples
The angle to the point (-1, 1)
A B C D 1 x y 2 -1 1 135 In D2:
=DEGREES(ATAN2(A2, B2))→ 135A point straight down
A B C D 1 x y 2 0 -5 -90 In D2:
=DEGREES(ATAN2(A2, B2))→ -90
Common mistakes
- The order of x and y. Excel takes x first. Some languages and programs take y first, which swaps the answer.
ATAN2 in other languages
Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.
- Czech: ARCTG2
- Danish: ARCTAN2
- Dutch: BOOGTAN2
- Finnish: ATAN2
- French: ATAN2
- German: ARCTAN2
- Hungarian: ARCTAN2
- Italian: ARCTAN.2
- Norwegian: ARCTAN2
- Polish: ATAN2
- Portuguese (Brazil): ATAN2
- Portuguese (Portugal): ATAN2
- Russian: ATAN2
- Spanish: ATAN2
- Swedish: ARCTAN2
- Turkish: ATAN2