Inverse Tangent Calculator — arctan & atan2
Find the angle whose tangent equals a given value (atan), or compute the full quadrant-aware angle from (x, y) coordinates (atan2), in degrees and radians.
Mode
Quadrant-aware angle in (−180°, 180°]
- 1
atan2(y, x) in radians
atan2(1, 1) = 0.785398Quadrant-aware; range (−π, π]. - 2
Convert to degrees
0.785398 × 180 ÷ π = 45
How does this calculator work?
atan(x) gives the angle in (−90°, 90°) whose tangent is x. atan2(y, x) gives the full quadrant-aware angle in (−180°, 180°] from a vector — the go-to formula in navigation and graphics where the ratio y/x alone is ambiguous. Both results appear in degrees and radians; atan2 also reports the vector magnitude.
Formula
How this is calculated
The one-argument form atan(x) returns the principal inverse tangent: the unique angle θ in the open interval (−90°, 90°) whose tangent equals x. Because the tangent function spans all real values, atan accepts any finite number and its output is bounded between its asymptotes.
The two-argument form atan2(y, x) extends this to full 360° directionality. By taking the vertical and horizontal components separately, it can determine the correct quadrant from the signs of both arguments. This resolves the ambiguity in atan(y/x) where opposite-quadrant vectors — for example (1, 1) and (−1, −1) — would share the same ratio. The result range is (−180°, 180°]: positive y gives positive angles (upper half-plane), negative y gives negative angles, and when x = 0 the result is ±90°.
atan2 is the standard choice in physics, navigation, robotics and computer graphics for converting (x, y) vector components into a bearing or heading. The calculator also reports the magnitude √(x² + y²) so you can fully reconstruct the vector in polar form.
Frequently asked questions
atan(x) takes a single ratio and returns an angle in (−90°, 90°). atan2(y, x) takes two components and returns a full 360° angle in (−180°, 180°], correctly distinguishing opposite quadrants that share the same y/x ratio — for example (1, 2) and (−1, −2) both have ratio 0.5 but point in opposite directions.
The origin has no direction — any angle would be equally valid. Both IEEE 754 and this calculator require at least one non-zero component.
If the atan2 result is negative, add 360°. For example, −45° becomes 315°. If you define north as the positive y-axis, swap the arguments to atan2(x, y) before adding the correction.
Also known as
TG we-Calculate Editorial Team. (2026). Inverse Tangent Calculator — arctan & atan2 [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/inverse-tangent-calculator
TG we-Calculate Editorial Team. "Inverse Tangent Calculator — arctan & atan2." TG we-Calculate. 2026. https://we-calculate.com/calculator/inverse-tangent-calculator.
TG we-Calculate Editorial Team, "Inverse Tangent Calculator — arctan & atan2," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/inverse-tangent-calculator
@misc{wecalculate_inverse_tangent_calculator, title = {Inverse Tangent Calculator — arctan & atan2}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/inverse-tangent-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
