# Vector Magnitude and Angle Calculator

URL: https://speedycalculator.com/calculators/math/vector-magnitude/
Last updated: 2026-10-25

> This calculator finds the magnitude (length) of a 2D or 3D vector, its unit vector and the angle it makes with the x-axis. Enter components x, y and optionally z.

## Inputs

- x component
- y component
- z component

## Results

- Magnitude
- Unit vector x
- Unit vector y
- Unit vector z
- Angle with x-axis

## Formula

```
|v| = √(x² + y² + z²)
```

## Explanation

Vectors describe quantities with both size and direction, such as velocity and force.

### How to use the Vector Magnitude and Angle Calculator

- **x component**
- **y component**
- **z component**

Results update as you type, and every field accepts the units shown in its menu.

### How it works

Square each component, add them and take the square root. The unit vector divides each component by the magnitude.

### Inputs explained

FieldWhat to enterx componentA numbery componentA numberz componentA number

### What each result means

- **Magnitude** = sqrt([x component]^2 + [y component]^2 + [z component]^2)
- **Unit vector x** = [x component]÷[Magnitude]
- **Unit vector y** = [y component]÷[Magnitude]
- **Unit vector z** = [z component]÷[Magnitude]
- **Angle with x-axis** = deg(acos([x component]÷[Magnitude]))

### Example values

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

x componentMagnitude1.512.73772.2512.84773133.7513.19334.513.4257614

## Worked example

Inputs — x component: 3; y component: 4; z component: 12.

Results — **Magnitude = 13**; Unit vector x = 0.230769; Unit vector y = 0.307692; Unit vector z = 0.923077; Angle with x-axis = 76.6576 °.

## FAQ

**How do I use it for a 2D vector?**
Set z to 0.

**What is a unit vector?**
A vector of length 1 pointing in the same direction.

**What formula does the Vector Magnitude and Angle Calculator use?**
|v| = √(x² + y² + z²).

