Arcus Tangent Calculator

Enter a vertical value (y) and horizontal value (x) to find the angle whose tangent is y⁄x, using the two-argument arctangent atan2(y, x) so the correct quadrant is always used — plus the hypotenuse and quadrant location.

Quick Facts

Formula
θ = atan2(y, x)
Matches arctan(y/x) when x > 0, and automatically corrects the quadrant when x ≤ 0.
Range
-180° to 180° (-π to π radians)
Single-argument arctan alone is limited to -90° to 90°.

Your Results

Calculated
Angle (degrees)
-
θ = atan2(y, x)
Angle (radians)
-
Same angle in radians
Hypotenuse
-
√(x² + y²)
Quadrant
-
Based on the signs of x and y

Ready

Enter x and y, then press Calculate.

Understanding Arcus Tangent

Arcus tangent — usually written arctan(x), tan⁻¹(x), or atan(x) — is the inverse of the tangent function. Given a ratio x, it answers the question "what angle has this tangent?" Because a single ratio could come from an angle in more than one quadrant, the plain single-argument arctan(x) is defined to always return a value between -90° and 90° (-π/2 to π/2 radians), no matter what x is.

The two-argument arctangent: atan2(y, x)

This calculator uses the more general and more practical form, atan2(y, x), which takes the vertical value y and horizontal value x separately instead of collapsing them into a single ratio first. Because it sees the sign of both numbers, atan2 can place the angle in the correct one of all four quadrants and returns a value across the full circle, from -180° to 180° (-π to π radians):

  • x > 0, y > 0 — Quadrant I, angle between 0° and 90°
  • x < 0, y > 0 — Quadrant II, angle between 90° and 180°
  • x < 0, y < 0 — Quadrant III, angle between -180° and -90°
  • x > 0, y < 0 — Quadrant IV, angle between -90° and 0°

When x is positive, atan2(y, x) gives exactly the same result as arctan(y/x). The difference only shows up when x is negative or zero, which is precisely where a plain arctan(y/x) calculation would give the wrong quadrant or fail outright from division by zero.

Degrees vs. radians

Radians are the natural unit in calculus and most programming math libraries; degrees are more familiar for everyday angles. Conversion: degrees = radians × 180/π, and radians = degrees × π/180. A full circle is 360° = 2π radians.

Common applications

  • Finding the bearing or heading from one point to another in navigation, robotics, and game development
  • Converting rectangular (x, y) coordinates to polar coordinates (radius and angle)
  • Finding a missing angle in a right triangle from its opposite and adjacent sides (surveying, construction)
  • Computing the slope angle of a line, ramp, or roof pitch from its rise and run

Frequently Asked Questions

What is the difference between arctan(x) and atan2(y, x)?
Arctan(x), the single-argument inverse tangent, only returns angles between -90° and 90° because it cannot tell which quadrant a ratio came from. Atan2(y, x) takes the vertical and horizontal values separately, so it uses the sign of each one to place the angle in the correct quadrant, returning any value from -180° to 180°. When x is positive, atan2(y, x) gives the same result as arctan(y/x).
Why is x = 0 and y = 0 not allowed?
When both x and y are zero, the point sits exactly at the origin, which has no direction and therefore no defined angle. Any other combination is fine, including x = 0 with a nonzero y (a vertical direction, 90° or -90°) or y = 0 with a nonzero x (a horizontal direction, 0° or 180°).
How do I convert the result between degrees and radians?
Multiply radians by 180/π to get degrees, or multiply degrees by π/180 to get radians. This calculator shows both automatically, so no manual conversion is required.
What is the hypotenuse value used for?
The hypotenuse is the straight-line distance from the origin to the point (x, y), computed with the Pythagorean theorem as √(x² + y²). It is the same length you would get by treating x and y as the two legs of a right triangle, and it does not depend on which quadrant the point falls in.