2D Vector Calculator

Find the magnitude and angle of a 2D vector.

How it is calculated

The magnitude is |v| = √(x² + y²), computed with the hypotenuse function and shown to 4 decimals. The direction is θ = atan2(y, x) converted to degrees and shown to 2 decimals. Unlike a plain arctan(y/x), atan2 uses the signs of both components, so the angle lands in the correct quadrant and runs from −180° to 180°, measured counter-clockwise from the positive x axis. A vector with x = 0 and y = 0 has magnitude 0 and the angle is reported as 0°.

Worked example

Take the vector (3, 4). Magnitude: 3² + 4² = 9 + 16 = 25, and √25 = 5.0000. Angle: atan2(4, 3) is the angle whose tangent is 4/3, which is 53.13° above the positive x axis.

Try this example →

Common mistakes

  • Computing arctan(y / x) by hand for negative x. A vector at (−3, 4) points at about 126.87°, not −53.13°.
  • Expecting an angle between 0° and 360°. Results below the x axis are negative, so −45° means 315°.
  • Swapping x and y, which mirrors the angle around 45°.
  • Reading the angle as a compass bearing. Bearings start at north and turn clockwise, while this angle starts at east and turns counter-clockwise.

About this calculator

This calculator finds a 2D vector's magnitude, |v| = √(x² + y²) (from the Pythagorean theorem), and its direction angle, θ = arctan(y/x) (adjusted for the correct quadrant), given its x and y components. Together, magnitude and angle describe the same vector in polar form instead of Cartesian form — the two representations are mathematically interchangeable.

Physics and engineering students use this to convert between component and polar notation for forces, velocities and displacements, and it's a basic building block in computer graphics, robotics and game development for representing direction and speed. Enter the x and y components to get the magnitude and angle.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators