Vector length calculator

Type x and y. Length is √(x² + y²), always non-negative. Vector (3, 4) has length 5, like a 3-4-5 triangle. (5, 12) is 13. Leave optional z empty in the plane.

Length is never negative. It is the same idea as the distance from the origin to the point (x, y) or (x, y, z).

Input

Result

Enter x and y (and z if you need 3D).

How it works

Vector length is how long the arrow is when you draw it from the origin. In the plane you compute it like the hypotenuse of a rectangle with sides |x| and |y|. 2D formula: |v| = √(x² + y²). With a third coordinate: |v| = √(x² + y² + z²). (3, 4) gives √(9+16) = 5.

That is the same idea as the Pythagorean theorem, only from coordinates. 3 sideways and 4 forward: the diagonal is 5. (5, 12) is 13. In space (1, 2, 2) gives √(1+4+4) = 3. (0, 0) has length 0, the zero vector.

Fields: x coordinate, y coordinate, and optional z. Leave z empty for a planar vector. Type 3 and 4, click Calculate. A comma and a period both parse. A minus in x does not change length: (−3, 4) is still 5.

Sine 3/5 from this triangle lives on sine. The missing side when you know two lives on Pythagoras. Here you always start from coordinates, not from a side list.

Without x or y, nothing computes. Empty z means 2D, not zero in z. If you want (3, 4, 0), type 0 in z on purpose.

(6, 8) is 10, a doubled (3, 4). (8, 15) is 17. (3, 4, 12) is 13, because 9+16+144 = 169.

Formula

2D: |v| = √(x² + y²)

3D: |v| = √(x² + y² + z²)

How to use

  1. Type the x coordinate, for example 3.
  2. Type the y coordinate, for example 4.
  3. Leave z empty in the plane. In space type z, for example 2 with (1, 2, 2).
  4. Click Calculate. (3, 4) is 5. (5, 12) is 13. (1, 2, 2) is 3.
  5. The missing side of a 3-4-5 triangle lives on Pythagoras. Here the inputs are coordinates.

|v| = 5 at (3, 4)

Length √(x² + y²). Vector (3, 4) has length 5. (5, 12) is 13. Leave z empty in the plane.

x
First coordinate. 3 with y = 4 gives 5. 5 with y = 12 gives 13. 1 with y = 2 and z = 2 gives 3.
y
Second coordinate. 4 with x = 3. 0 with x = 0 gives length 0.
z
Optional third. Leave empty in the plane. 2 with (1, 2) closes √9 = 3.

Examples

Example 1

  • x: 3
  • y: 4
  • z: (empty)

5

√(9+16) = 5. Same length as a 3-4-5 triangle.

Example 2

  • x: 5
  • y: 12

13

Another tidy triple: 5-12-13.

Example 3

  • x: 1
  • y: 2
  • z: 2

3

√(1+4+4) = √9 = 3.

Example 4

  • x: 0
  • y: 0

0

No displacement means length zero.

Related calculators

Frequently asked questions

How long is vector (3, 4)?

5. √(9+16) = 5. The same length as the hypotenuse of a 3-4-5 triangle.

How long is (5, 12)?

13. Another 5-12-13 triple: 25 + 144 = 169, then the square root.

When do I type z?

When you work in space. In the plane leave z empty. (1, 2, 2) is 3.

Is (−3, 4) also 5?

Yes. Length uses squares. A minus in x does not shorten the arrow.

How long is (0, 0)?

0. The zero vector. Typed zeros count; empty x or y does not.

How long is (3, 4, 12)?

13. 9 + 16 + 144 = 169. (6, 8) in the plane is 10.

How is this different from Pythagoras?

The same root. Here x and y (and z). There two sides and a solve-for list.

Is empty z zero?

No. Empty z means 2D mode. If you want z = 0, type 0.

How long is (8, 15)?

17. 64 + 225 = 289, and √289 = 17, the same Pythagorean step as (3, 4).

Does sine 3/5 belong here?

No. The length is 5. The ratio 3/5 = 0.6 is on sine, sides mode.

Knowledge sources

The calculator computes the same formula as the definition below.

Page updated in 2026.