Skip to content
D DocNectar

Free Angle Between Two Vectors Calculator

Find the angle between two 2D or 3D vectors using the dot product formula.

100% Free No Signup Works on all devices

Last updated October 13, 2026 · Report an error

Thanks for rating!

The angle between two vectors can be found from their dot product and magnitudes, using the formula cos(θ) = (u·v)/(|u||v|). This works identically for both 2D and 3D vectors, since the dot product and magnitude formulas both extend naturally to any number of dimensions. This calculation shows up constantly wherever direction matters as much as size: physics uses it to find the angle between force and displacement vectors when computing work (W = |F||d|cosθ), computer graphics and game engines use it to determine lighting angles and whether a surface faces the camera, machine learning uses the closely related cosine similarity to compare document or embedding vectors, and structural engineering uses it to resolve forces acting at an angle to a beam or cable.

How it works

Choose 2D or 3D and enter both vectors' components. The calculator first computes the dot product u·v (multiplying corresponding components and summing them), then the magnitude of each vector (the square root of the sum of its squared components, by the Pythagorean theorem), and finally solves cos(θ) = (u·v)/(|u||v|) for θ by taking the arccosine of the result. Because dividing by each vector's own length cancels out any scaling, this formula returns the true angle between the vectors' directions regardless of how long either one is.

  1. Enter vector dimension.
  2. Enter u₁.
  3. Enter u₂.
  4. Enter u₃ (3D only).
  5. Enter v₁.
  6. Enter v₂.
  7. Enter v₃ (3D only).
  8. Click Calculate to see your results.

Examples

u=(1,0), v=(0,1)

The dot product is (1×0)+(0×1) = 0, so cos(θ) = 0/(1×1) = 0, and θ = arccos(0) = 90° — the vectors are perpendicular.

u=(3,4), v=(4,3)

The dot product is (3×4)+(4×3) = 24. Both magnitudes are √(3²+4²) = 5, so cos(θ) = 24/(5×5) = 0.96, and θ = arccos(0.96) ≈ 16.26°.

u=(1,1,0), v=(1,0,1) (3D)

The dot product is (1×1)+(1×0)+(0×1) = 1. Both magnitudes are √2, so cos(θ) = 1/(√2×√2) = 1/2, and θ = arccos(0.5) = 60°.

Common mistakes to avoid

  • Forgetting to fill in the z-component when switching to 3D mode, silently treating the vector as if it lies flat in the xy-plane.
  • Confusing the dot product (which returns a single number, used here) with the cross product (which returns another vector and is only defined in 3D).
  • Assuming a negative dot product means the vectors point in exactly opposite directions — it only means the angle exceeds 90°, not that it equals 180°.
  • Trying to compute an angle involving a zero vector, which has no defined direction and therefore no meaningful angle to anything else.

Frequently asked questions

It means the vectors are perpendicular (90° apart), since cos(90°) = 0 — a zero dot product is the standard test for perpendicularity in any number of dimensions.
No — the angle between a zero-length vector and anything else is undefined, since a zero vector has no direction to compare. The formula would require dividing by a magnitude of zero, which is undefined.
No — the angle between u and v is the same as the angle between v and u, since the dot product is commutative (u·v = v·u) and both magnitudes stay the same either way.
It means the angle between the vectors is greater than 90° (obtuse) — the vectors point in substantially different, "opposing" directions, even if not exactly opposite.
They're the same formula. Cosine similarity is literally cos(θ) computed via this dot-product method, used to measure how similar two vectors' directions are (1 = identical direction, 0 = perpendicular/unrelated, -1 = opposite direction) regardless of their magnitudes.
0° — since a vector is perfectly aligned with itself, cos(θ) = (u·u)/(|u||u|) = |u|²/|u|² = 1, and arccos(1) = 0°.
No — by convention, the angle between two vectors is always reported as the value between 0° and 180° (the "smaller" of the two possible ways to measure it going around), which is exactly the range arccos naturally returns.

Get new calculators and guides in your inbox

No spam — just new tools like Angle Between Two Vectors Calculator and practical guides.

Favorites