Inverse Tangent Calculator

Enter a value x to get arctan(x), or add an optional y value to compute the two-argument atan2(y, x) — a quadrant-correct angle across the full circle.

Quick Facts

Definition
arctan(x) = tan⁻¹(x)
Returns the angle whose tangent equals x.
Principal range
-90° to 90° (-π/2 to π/2)
Single-argument arctan never returns exactly ±90°, since tan(90°) is undefined.
Two-argument form
atan2(y, x)
Uses the signs of both y and x to return an angle over the full circle, -180° to 180°.

Your Results

Calculated
Angle (Degrees)
-
θ, converted from radians
Angle (Radians)
-
arctan(x) or atan2(y, x)
Quadrant
-
Based on the signs of x and y (atan2 mode)
Positive Coterminal Angle
-
Same angle expressed as 0°-360°

Ready

Enter x (and optionally y), then press Calculate.

Formula and Method for the Inverse Tangent (arctan)

The tangent function tan(θ) is periodic and not one-to-one, so it has no single inverse over all angles. To define an inverse, mathematicians restrict tangent to the interval -90° to 90° (-π/2 to π/2 radians), where it is strictly increasing and maps bijectively onto every real number. The inverse tangent, written arctan(x) or tan⁻¹(x), undoes that restricted tangent: it takes any real number x and returns the unique angle θ in (-90°, 90°) such that tan(θ) = x.

Single-argument arctan(x) vs. two-argument atan2(y, x)

If you leave the y field blank, this calculator computes the standard single-argument θ = arctan(x). Because it only receives one number, it cannot tell whether the original point had a positive or negative y-coordinate, so the result is always squeezed into the open range -90° to 90°. If you also enter a y value, the calculator instead computes the two-argument θ = atan2(y, x), which looks at the signs of x and y separately. atan2 returns an angle over the full circle, -180° up to and including 180°, and correctly places the result in quadrant I, II, III, or IV — exactly the calculation used to convert Cartesian coordinates (x, y) into a polar angle, or a vector's components into a heading.

Degrees, radians, and checking your answer

The calculator reports the angle in both units: radians, the native output of JavaScript's Math.atan()/Math.atan2(), and degrees, obtained by multiplying radians by 180/π. To sanity-check a result by hand, plug it back into tangent: for standard mode tan(θ) should return to x; for atan2 mode, tan(θ) should equal y/x (when x ≠ 0) and the sign of θ should match the quadrant of (x, y). The "positive coterminal angle" result adds 360° to any negative angle so you can read it as a compass-style bearing between 0° and 360°.

Common mistakes

  • Expecting arctan(x) to reach ±90°: it never does, no matter how large x is — the function only approaches those limits asymptotically.
  • Mixing up arctan(x) with atan2(y, x): arctan(y/x) alone loses quadrant information whenever x is negative; atan2(y, x) keeps the signs of both components and gives the correct quadrant.
  • Forgetting degrees vs. radians: most calculators and spreadsheet functions (ATAN, ATAN2) return radians by default — convert before comparing to a protractor reading.

Real-world applications

  • Converting a line's slope (rise/run) into an angle for roof pitch, ramps, or road grade specifications.
  • Computing phase angle in AC circuits from the ratio of reactance to resistance in an impedance triangle.
  • Converting Cartesian vector components (x, y) into a heading or bearing in navigation, robotics, and game development, typically via atan2.
  • Finding an angle of elevation or depression in surveying and physics problems given opposite and adjacent side lengths.

Frequently Asked Questions

What is the difference between arctan(x) and atan2(y, x)?
Single-argument arctan(x) only receives one number, so it always returns an angle strictly between -90° and 90° — it cannot tell which quadrant the original point was in. The two-argument atan2(y, x) receives the y and x coordinates separately, uses their individual signs, and returns an angle across the full circle from -180° to 180°, correctly identifying the quadrant.
What is the range of the inverse tangent function?
Standard arctan(x) always returns a value in the open interval -90° to 90° (-π/2 to π/2 radians), never reaching exactly ±90° because tangent itself is undefined there. The two-argument atan2(y, x) extends the usable range to -180° up to and including 180°.
How do I convert the result from radians to degrees?
Multiply radians by 180/π to get degrees, or multiply degrees by π/180 to get radians. This calculator computes and displays both units automatically so no manual conversion is needed.
Why is atan2 undefined when x = 0 and y = 0?
At the origin there is no defined direction, since both the horizontal and vertical components are zero and every angle is equally valid. The calculator flags x = 0 and y = 0 together as an invalid input instead of returning a misleading angle.