# Unit Vector Calculator

URL: https://speedycalculator.com/calculators/math/unit-vector/
Last updated: 2026-10-30

> The unit vector calculator divides a 2D or 3D vector by its length to give the unit vector in the same direction, û = u / |u|.

## Inputs

- Dimension
- x
- y
- z

## Results

- û – x
- û – y
- û – z
- Magnitude |u|
- Direction angle (2D)

## Formula

```
û = (x/|u|, y/|u|, z/|u|),  |u| = √(x² + y² + z²)
```

## Explanation

A unit vector has length 1 and carries only direction. Unit vectors describe directions of forces, surface normals in 3D graphics, and the axes î, ĵ, k̂.

### How to use the Unit Vector Calculator

- **Dimension**
- **x**
- **y**
- **z**

Results update as you type, and everything is calculated in your browser.

### How it works

The magnitude is computed with the Pythagorean theorem and each component is divided by it. The zero vector has no direction, so it has no unit vector.

### Inputs explained

FieldWhat to enterDimensionChoose one: 2D, 3DxA numberyA numberzA number

### What each result means

- **û – z** = [z]÷sqrt([x]^2 + [y]^2 + [z]^2)
- **Direction angle (2D)** = mod(deg(atan2([y], [x])), 360)

### Example values

How the main result changes when **x** changes and everything else stays at the example values above:

xû – x1.50.35112.250.490330.63.750.68394.50.747460.8321

## Worked example

Inputs — Dimension: 2D; x: 3; y: 4.

Results — **û – x = 0.6**; û – y = 0.8; Magnitude |u| = 5; Direction angle (2D) = 53.1301 °.

## Key terms

- **Unit vector**: A vector of length 1.

## FAQ

**What is the unit vector of (3, 4)?**
(0.6, 0.8).

**Why normalise a vector?**
To separate direction from size, e.g. for lighting calculations or directions of forces.

**Does the zero vector have a unit vector?**
No – its length is zero.

**What are î, ĵ and k̂?**
The unit vectors along the x, y and z axes.


## Sources

- [OpenStax – Calculus Volume 3](https://openstax.org/details/books/calculus-volume-3)
- [Wolfram MathWorld – Vector](https://mathworld.wolfram.com/Vector.html)
