Skip to content
Calculator Trigonometri
Calculator Trigonometri

ATAN2 Calculator

Find a quadrant-aware angle from coordinates.

Inverse & Special Angles

Interactive ATAN2 Calculator

Result
0.70710678

sin(45°) = 0.70710678

How ATAN2 Calculator Works?

The ATAN2 Calculator works by taking a y-value and an x-value separately and returning the angle of the point (x, y) measured from the positive x-axis, in the correct quadrant. The result lies in (−180°, 180°].

  1. Enter x in the first field. x is the horizontal coordinate.
  2. Enter y in the second field. y is the vertical coordinate.
  3. Choose the output unit. Degrees, radians, gradians, or turns.
  4. Read atan2(y, x). Positive angles are counterclockwise from the +x axis; negative angles are clockwise. Add 360° to a negative result for a [0°, 360°) bearing.

ATAN2 Calculator Formula

ATAN2 returns arctan(y/x) adjusted by ±180° when x < 0, so the angle lands in the quadrant of (x, y).

x > 0: atan2(y, x) = arctan(y / x)
x < 0, y ≥ 0: atan2(y, x) = arctan(y / x) + π
x < 0, y < 0: atan2(y, x) = arctan(y / x) − π
x = 0: atan2(y, 0) = +π/2 for y > 0, −π/2 for y < 0
x
= horizontal coordinate
y
= vertical coordinate

Worked Example

Find the angle of (−1, −1). arctan(−1/−1) = arctan(1) = 45°, which points into Quadrant I. ATAN2 corrects the quadrant: atan2(−1, −1) = −135°, or 225° measured counterclockwise.

ATAN2 Calculator Conversion Table

The ATAN2 conversion table compares plain arctan(y/x) with atan2(y, x) for 9 points, showing where the quadrant correction applies.

Point (x, y)arctan(y/x)atan2(y, x)atan2 in [0°, 360°)
(1, 0)0°0°0°
(1, 1)45°45°45°
(0, 1)Undefined90°90°
(−1, 1)−45°135°135°
(−1, 0)0°180°180°
(−1, −1)45°−135°225°
(0, −1)Undefined−90°270°
(1, −1)−45°−45°315°
(−3, 4)−53.13°126.87°126.87°

Spreadsheet software swaps the argument order: Excel and Google Sheets use ATAN2(x, y), while C, Python, and JavaScript use atan2(y, x).

What is ATAN2 Calculator?

An ATAN2 Calculator is a tool that returns the full-circle angle of a point from its x and y coordinates. ATAN2 stands for “2-argument arctangent”.

Plain arctan(y/x) loses the signs of x and y, so (1, 1) and (−1, −1) give the same 45°. ATAN2 keeps both signs and separates all 4 quadrants. ATAN2 handles x = 0 without dividing by zero.

The output range is (−π, π]. atan2(0, 0) is undefined in mathematics; most programming languages return 0 for that input.

What are the uses of ATAN2 Calculator?

There are 6 main uses of an ATAN2 Calculator.

  • Polar conversion: Compute θ when converting Cartesian (x, y) to polar (r, θ).
  • Game development: Rotate a sprite to face the mouse cursor or a target.
  • Robotics and drones: Find heading from a position difference (Δx, Δy).
  • Complex numbers: Get the argument arg(z) of z = x + iy.
  • Signal processing: Extract phase from in-phase (I) and quadrature (Q) samples.
  • GIS mapping: Compute bearings between projected map coordinates.

Related Inverse & Special Angles

View all 182 tools →