Angle Between Vectors Calculator

Find the angle between two vectors.

How it is calculated

The angle comes from the dot product: θ = arccos( (a·b) / (|a|·|b|) ), where a·b = ax·bx + ay·by + az·bz and |a| = √(ax² + ay² + az²), likewise for b. The cosine is clamped to the range −1 to 1 before arccos so rounding error cannot cause a failure, and the angle is returned in degrees between 0° and 180°. A zero vector has no direction, so the tool gives no result for it. Only the directions matter: scaling a vector by a positive number does not change the angle.

Worked example

Let a = (1, 2, 3) and b = (4, −5, 6). Dot product: 1·4 + 2·(−5) + 3·6 = 4 − 10 + 18 = 12. Lengths: |a| = √14 ≈ 3.742 and |b| = √77 ≈ 8.775. Then cos θ = 12 / (3.742 × 8.775) ≈ 0.3654, and arccos of that gives an angle of 68.56 °.

Try this example →

Common mistakes

  • Entering a point's coordinates when you meant a vector between two points; subtract the start point first.
  • Expecting a signed or reflex angle (over 180°); the result is always the smaller angle between 0° and 180°.
  • Putting a 2D vector in and forgetting to set the z components to 0.
  • Assuming a dot product of zero means an error; it simply means the vectors are perpendicular (90°).
  • Reading the answer as radians; it is already in degrees.

About this calculator

This calculator finds the angle between two vectors in 3D space using the dot product formula: cos θ = (a·b) / (|a||b|). Enter the x, y, and z components of each vector to get the angle in degrees.

Physics and engineering students use it to check force diagrams and torque problems, while programmers working on 3D graphics or robotics use the same formula to detect the angle between surface normals, camera directions, or joint orientations.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators