totn Excel Functions

MS Excel: How to use the ATAN2 Function (WS)

This Excel tutorial explains how to use the Excel ATAN2 function with syntax and examples.

Description

The Microsoft Excel ATAN2 function returns the arctangent (in radians) of (x,y) coordinates.

The ATAN2 function is a built-in function in Excel that is categorized as a Math/Trig Function. It can be used as a worksheet function (WS) in Excel. As a worksheet function, the ATAN2 function can be entered as part of a formula in a cell of a worksheet.

Syntax

The syntax for the ATAN2 function in Microsoft Excel is:

ATAN2( x-coordinate, y-coordinate )

Parameters or Arguments

x-coordinate
The x-coordinate of a point.
y-coordinate
The y-coordinate of a point.

Returns

The ATAN2 function returns a numeric value.

Applies To

  • Excel for Office 365, Excel 2019, Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

Type of Function

  • Worksheet function (WS)

Example (as Worksheet Function)

Let's look at some Excel ATAN2 function examples and explore how to use the ATAN2 function as a worksheet function in Microsoft Excel:

Microsoft Excel

Based on the Excel spreadsheet above, the following ATAN2 examples would return:

=ATAN2(A1, A2)
Result: 0.674740942

=ATAN2(A2, A3)
Result: -0.643501109

=ATAN2(1, -9)
Result: -1.460139106

=ATAN2(0.2, 0)
Result: 0

=ATAN2(0, 0)
Result: #DIV/0!