Math & Trig All versions ◉ 47 views

=ATAN2()

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 -pi and pi, excluding -pi.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=ATAN2(x_num, y_num)
Hover argument names in the table for details.
Output typeNumber
Popularity38 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =ATAN2() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
Download ATAN2.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
x_num Number Required The x-coordinate of the point.
y_num Number Required The y-coordinate of the point.

▣ Examples

Arctangent of the point 1,1 in radians, pi/4 =ATAN2(1, 1)
Result: 0.785398163
Arctangent of the point -1,-1 in radians, -3*pi/4 =ATAN2(-1, -1)
Result: -2.35619449
Arctangent of the point 1,1 in degrees =ATAN2(-1, -1)*180/PI()
Result: -135
Arctangent of the point 1,1 in degrees =DEGREES(ATAN2(-1, -1))
Result: -135

§ Remarks

  • A positive result represents a counterclockwise 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.

✦ Tips

  • A positive result represents a counterclockwise 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.
  • To express the arctangent in degrees, multiply the result by 180/PI( ) or use the DEGREES function.

⚠ Common Errors

#DIV/0! If both x_num and y_num are 0, ATAN2 returns the #DIV/0! error value.
Fix: At least one must be nonzero

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.