Excel like a finance pro.
← The libraryPractice · 2 questions →
Math function
ATAN2
Returns the angle from x and y coordinates.
Rarely usedDifficulty 1300 · ProficientUsage rank #296 of 520
When to use it
Angle of the point (x, y) from the positive x axis, in radians, correctly placed in all four quadrants. Note the argument order: x first, then y, unlike most programming languages.
The shape of it
- Syntax
=ATAN2(x_num, y_num)
Worked examples
Quarter turn of a quarter
=ATAN2(1,1) → 0.785398163
Pi over four.
In degrees
=DEGREES(ATAN2(1,1)) → 45
In degrees.
Third quadrant
=DEGREES(ATAN2(-1,-1)) → -135
Third quadrant, which plain ATAN(y/x) would report as 45.
Worth knowing
- Compass bearing from a delta: =MOD(90-DEGREES(ATAN2(dx,dy)),360) when north is up.
- The result is between -pi and pi.
- Argument order is (x_num, y_num); most other tools use (y, x).
Where it goes wrong
- #DIV/0! when both arguments are 0.
- Swapping the arguments gives the complementary angle silently.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.