Angle Between Vectors Calculator

The angle between two vectors is the angle you would need to rotate one vector to align it with the other, measured as the smaller angle between 0 and 180 degrees. It is computed from the dot product formula: cos(theta) = (a . b) / (|a| * |b|), where a . b is the dot product (sum of products of corresponding components) and |a|, |b| are the magnitudes (Euclidean lengths). This formula works in any number of dimensions. Enter the components of two vectors (use z = 0 for 2D) to find the angle in degrees and radians, the dot product, and both magnitudes.

Vector a

Vector b

90.00
1.57
0.00

Angle formula using dot product

a . b = ax*bx + ay*by + az*bz
|a| = sqrt(ax^2 + ay^2 + az^2)
cos(theta) = (a . b) / (|a| * |b|)
theta = arccos(cos(theta))

The dot product gives the cosine of the angle when divided by the product of the magnitudes. The arccosine function returns the angle between 0 and 180 degrees (0 and pi radians).

Interpreting the angle

  • Theta = 0 degrees: vectors are parallel (same direction).
  • Theta = 90 degrees: vectors are perpendicular (orthogonal); dot product = 0.
  • Theta = 180 degrees: vectors are anti-parallel (opposite directions).
  • 0 degrees < theta < 90 degrees: vectors have a positive dot product (acute angle).
  • 90 degrees < theta < 180 degrees: vectors have a negative dot product (obtuse angle).

Angle between vectors: frequently asked questions

How do you find the angle between two vectors?

Use the dot product formula: cos(theta) = (a . b) / (|a| * |b|). Compute the dot product a . b = a1*b1 + a2*b2 + a3*b3, divide by the product of the magnitudes, then take the arccosine. The result is the angle between 0 and 180 degrees.

What does a zero angle mean?

An angle of zero means the vectors point in the same direction (they are parallel with the same orientation). Their dot product equals the product of their magnitudes.

What does a 90-degree angle mean?

A 90-degree angle means the vectors are perpendicular (orthogonal). Their dot product equals zero. This is used to test for perpendicularity: two vectors are perpendicular if and only if their dot product is zero.

What does a 180-degree angle mean?

A 180-degree angle means the vectors point in exactly opposite directions (anti-parallel). Their dot product equals negative the product of their magnitudes.

Is the dot product formula valid in 2D?

Yes. For 2D vectors a = (a1, a2) and b = (b1, b2), the dot product is a1*b1 + a2*b2 and the magnitudes are sqrt(a1^2 + a2^2) and sqrt(b1^2 + b2^2). The formula is identical; simply set the z component to zero.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 15 June 2026. See our methodology.