Vector Magnitude Calculator

The magnitude of a vector represents its length or distance from the origin. This calculator computes the magnitude for 2D and 3D vectors and also calculates the corresponding unit vector (normalized vector with magnitude 1), which is essential for representing directions in physics, graphics, and engineering applications.

Vector magnitude formula

|A| = sqrt(a1^2 + a2^2 + a3^2)
Unit vector: u = A / |A|

Vector magnitude calculator: frequently asked questions

What is the magnitude of a vector?

The magnitude (or length) of a vector is the distance from the origin to the point it represents. For a vector A = (a1, a2, a3), the magnitude is |A| = sqrt(a1^2 + a2^2 + a3^2). This uses the Pythagorean theorem extended to higher dimensions.

What is a unit vector?

A unit vector is a vector with magnitude 1. Any vector can be converted to a unit vector by dividing each component by the vector's magnitude. The unit vector points in the same direction as the original vector. Unit vectors are denoted with a hat, like u-hat.

How do you normalize a vector?

To normalize a vector (convert it to a unit vector), divide each component by the vector's magnitude. If A = (a1, a2), then the unit vector is A / |A| = (a1 / |A|, a2 / |A|). This preserves direction while scaling the length to 1.

What are unit vectors used for?

Unit vectors are used to represent directions without regard to magnitude. They are essential in physics for describing force directions, in computer graphics for surface normals and lighting, and in navigation for heading directions.

What is the zero vector?

The zero vector has all components equal to zero: (0, 0, 0). Its magnitude is 0. The zero vector has no direction and cannot be normalized. It is the additive identity in vector mathematics.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.