ATAN2 Function in Excel: Angle From X and Y

⏱ 1 min readUpdated 28 September 2026

MathLevel: ExpertAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Related functions

ATAN2 returns the angle of a point, handling all four quadrants. Note Excel’s order is (x, y) — the reverse of many programming languages.

Syntax

=ATAN2(x_num, y_num)
Argument What it means
x_num, y_num Coordinates.

Examples

Example 1

=DEGREES(ATAN2(B2, C2))

Compass-style bearing from east/north offsets.

DEGREES · SIN

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong