Direction Vector Calculator

Direction of Vector Calculator

Find the magnitude, unit vector, and direction angles for a 2D or 3D vector.

Last updated: June 2026 | By Patchworkr Team

Direction

Enter all three vector components as real numbers.

What is Vector Direction?

Direction describes where the vector points, independent of its length.

2D magnitude = sqrt(x^2 + y^2)
3D magnitude = sqrt(x^2 + y^2 + z^2)

The zero vector has no direction, so the calculator rejects it.

How to Use

1. Choose 2D or 3D.

2. Enter the vector components.

3. Read the live magnitude, unit vector, and direction angles.

Worked Example

For the 3D vector (3, 4, 12):

magnitude = sqrt(3^2 + 4^2 + 12^2) = 13

unit vector = (3/13, 4/13, 12/13)

FAQ

What happens with the zero vector?

The direction is undefined, so the tool shows an error.

Can direction cosines be negative?

Yes. Negative values mean the vector points toward the negative axis direction.

Does 2D use one angle?

Yes. 2D direction can be expressed by a single angle from the positive x-axis.

Is the formula exact?

Yes, subject only to floating-point rounding in the display.

Related Tools