No ads, no sign-upChecked 2026-08-24

Angle Between Vectors Calculator

Result

90.0000°

Result: 90.0000 °

Divide the dot product by the two magnitudes and take the inverse cosine. The answer is in degrees and always between 0 and 180: 0 means the vectors point the same way, 90 means they are perpendicular, 180 means they point opposite ways. Length does not matter, only direction.

Worked examples

Case 1
Vector A — x
1
Vector A — y
0
Vector A — z
0
Vector B — x
0
Vector B — y
1
Vector B — z
0

90.0000°

Open with these values
Case 2
Vector A — x
1
Vector A — y
1
Vector A — z
0
Vector B — x
1
Vector B — y
0
Vector B — z
0

45.0000°

Open with these values
Case 3
Vector A — x
1
Vector A — y
2
Vector A — z
2
Vector B — x
2
Vector B — y
2
Vector B — z
1

27.2660°

Open with these values

How it's calculated

θ = arccos( (A · B) ÷ (|A| × |B|) ), in degrees

  1. StepEnter the three components of vector A, then those of vector B.
  2. StepThe dot product is divided by the product of the two magnitudes.
  3. ResultThe inverse cosine of that ratio is the angle, converted to degrees.

Reference table

ax, ay, az, bx, by, bzcos θAngle
1, 2, 3, 1, 2, 310.0000
2, 0, 0, 5, 0, 010.0000
1, 2, 2, 2, 2, 18 ÷ 927.2660
1, 1, 0, 1, 0, 01 ÷ √245.0000
1, 0, 0, 0, 1, 0090.0000
1, 0, 0, -1, 0, 0−1180.0000

Questions

How do I calculate the angle between two vectors?

Take the dot product, divide it by the product of the two magnitudes, then take the inverse cosine: θ = arccos( (A · B) ÷ (|A| × |B|) ). For (1, 0, 0) and (0, 1, 0) the dot product is 0, so θ = arccos(0) = 90°.

Is the result in degrees or radians?

Degrees. The inverse cosine itself returns radians, and this calculator multiplies by 180 ÷ π before showing the result, so a right angle reads 90 and not 1.5708.

What range can the angle be in?

Always between 0° and 180°. It is the unsigned angle, so it never tells you which way you would have to rotate.

Does the length of the vectors change the angle?

No. The formula divides both magnitudes out, so only the directions matter. Doubling a vector from (1, 0, 0) to (2, 0, 0) leaves the angle unchanged.

Why does a zero vector give no result?

The zero vector (0, 0, 0) has no direction, so the angle to it is undefined. The formula would divide by its magnitude of zero, and the calculator shows no result instead of inventing one.

Sources and last check

  1. mathworld.wolfram.com

Information, not professional advice.