Direction Angle of a 2D Vector

θ=atan2⁡(vy,  vx)\theta = \operatorname{atan2}(v_y,\; v_x)
sig figs

Worked example: Components (−1, 1) → direction 135°. Press Try an example to run it live, then adjust anything.

Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value. Change any unit and the answer follows.

Where Direction Angle of a 2D Vector fits

Missing an input?
Your answer feeds
In this toolkit

See also

x-Component from Magnitude and Angle: Both use direction angle from +x axis and vector x component.y-Component from Magnitude and Angle: Both use direction angle from +x axis and vector y component.Angle Between Two 2D Vectors (Components): Both use vector x component and vector y component.Cross Product z-Component of Two 2D Vectors: Both use vector x component and vector y component.Dot Product of Two 2D Vectors (Components): Both use vector x component and vector y component.Dot Product of Two 3D Vectors (Components): Both use vector x component and vector y component.
3 more relatedMagnitude of a 2D Vector: Both use vector x component and vector y component.Magnitude of a 3D Vector: Both use vector x component and vector y component.Unit Vector Component (Normalization): Both use vector x component.
Here the solver did the work. Could you?

Reading the vector →

Grade 12Grade 12 Math

Test your skills in the Exam Room: new numbers every attempt. Free lessons for students, no sign-up, just pure learning. Find 3 more lessons on this formula.

See your Report Card
Learning zone

Direction Angle of a 2D Vector explained

θvyvx

Components tell you where a vector ends; the direction angle tells you which way it leans. Since tan θ = vy/vx, the naive answer is arctan(vy/vx), and that answer is wrong half the time. The ratio for (−3, −4) is identical to the ratio for (3, 4), so a plain arctan reports a vector pointing southwest as though it pointed northeast. The fix is the two-argument function atan2(vy, vx), which keeps both signs and returns the true bearing anywhere in the full −180° to 180° sweep. It entered programming through early Fortran and is now in every standard library precisely because the quadrant bug was so pervasive.

Example: (−1, 1) points up and to the left, and atan2(1, −1) = 135°, correct, where arctan(1/−1) = −45° would have been off by exactly half a turn. Read the other way, a vector known to lie at 30° with vx = 10 must have vy = 10 tan 30° ≈ 5.774. Straight up or straight down the tangent blows up, which is the arithmetic's honest way of saying a vertical vector has no run to divide by.

Direction Angle of a 2D Vector formula

θ=atan2⁡(vy,  vx)\theta = \operatorname{atan2}(v_y,\; v_x)
Where
  • θ\theta= Direction angle from +x axis (°)
  • vxv_x= x-component
  • vyv_y= y-component
Revised 31 October 2026
Cite this page

formula.expert. (2026, October 31). Direction Angle of a 2D Vector Formula & Calculator. https://formula.expert/solvers/vector-direction-angle-2d