Unit Vector Calculator

Enter the vector components to find its unit vector.

How it is calculated

The tool normalises a vector so that it keeps its direction but has length 1. First the magnitude: |v| = √(x² + y² + z²). Then each component is divided by it: û = (x ÷ |v|, y ÷ |v|, z ÷ |v|). The three components can be any real numbers, positive or negative, in any consistent unit; the unit cancels out. An empty component is treated as 0, so a 2D vector can be entered by leaving z blank. The zero vector (0, 0, 0) has no direction, so no result is shown. The magnitude and the three unit components are rounded to four decimals, which means that squaring and adding the rounded outputs may give 0.9999 or 1.0001.

Worked example

Find the unit vector of v = (2, 3, 6). Magnitude: √(2² + 3² + 6²) = √(4 + 9 + 36) = √49 = 7.0000. Divide each component by 7: x = 2 ÷ 7 = 0.2857, y = 3 ÷ 7 = 0.4286, z = 6 ÷ 7 = 0.8571. Check: 0.2857² + 0.4286² + 0.8571² ≈ 0.0816 + 0.1837 + 0.7346 = 0.9999, which is 1 within rounding.

Try this example →

Common mistakes

  • Dividing by the sum of the components or by the largest one instead of by the square root of the sum of squares.
  • Dropping the minus signs: the unit vector keeps the signs of the original components, so v = (−2, 3, 6) points a different way from (2, 3, 6).
  • Treating the output as a vector of length 1 after rounding; the four-decimal values can give 0.9999 or 1.0001 when squared and added.
  • Entering a point's coordinates when you meant a direction between two points; first subtract the start point from the end point, then enter that difference.
  • Entering the zero vector or a vector that is almost zero and expecting a direction; zero gives no result, and a vanishingly small vector shows a magnitude of 0.0000 even though its direction is still defined and the unit components come out right (1e-200, 0, 0 gives 1.0000, 0.0000, 0.0000).

About this calculator

A unit vector points in exactly the same direction as an original vector but has a magnitude of exactly 1, which makes it useful anywhere only direction matters and length would just get in the way of the math. It's found by dividing each component of the vector by its magnitude, computed as the square root of the sum of the squared components: û = v ÷ |v|, where |v| = √(x² + y² + z²) for a 3D vector.

This calculator takes a vector's x, y, and z components, computes the magnitude, and returns the normalized unit vector. Physics students working with force and velocity directions, game and graphics programmers computing surface normals and lighting angles, and engineers doing structural or mechanical analysis use it whenever a calculation needs a pure direction — such as a light ray's angle of incidence — decoupled from the original vector's length.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Once you have a unit vector, you can place any distance along that direction by multiplying. The default (3, 4, 0) has magnitude 5 and unit components 0.6 and 0.8, so 10 units along it lands at (6, 8, 0). Because the output is rounded to four decimals, large multipliers magnify the rounding: 700 times 0.2857, from the (2, 3, 6) vector, gives 199.99 rather than 200. What are you normalising vectors for, graphics, physics or something else?

Popular calculators

All Calculators