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.