Calculate the angle between two 2D, 3D, or 4D vectors in degrees and radians. Get the dot product, magnitudes, cosine similarity, and step-by-step work. Private—runs locally in your browser.
Vectors & Settings
Vector a: Components
Vector b: Components
Vector a: Components
Vector b: Components
Vector a: Components
Vector b: Components
Vector a from Point A to Point B
Vector b from Point C to Point D
Vector a from Point A to Point B
Vector b from Point C to Point D
Vector a from Point A to Point B
Vector b from Point C to Point D
Enter vectors to see results…
Show steps will appear here after you calculate.
Formula: θ = arccos((a·b)/(||a||·||b||)) for non-zero vectors. We clamp the ratio to [-1,1] to avoid NaN from rounding.
Press Enter in any field to compute.
Preview (2D)
In 2D mode, shows a, b, and the measured angle. 3D and 4D results are calculated numerically.
Release update v1.1
v1.1(May 21, 2026)
Added 4D vector support for component and two-point inputs.
Added step-by-step work for dot products, magnitudes, formula substitution, and arccos.
Added two-point vector entry so each vector can be built from an initial and terminal point.
Updated the page structure, title, and explanatory sections around calculator-focused search intent.
How to Use the Angle Between Two Vectors Calculator
Choose 2D, 3D, or 4D vectors.
Select whether you want to enter vector components or build each vector from two points.
Enter the components of vector a and vector b, or enter the initial and terminal points for each vector.
Click Calculate.
Read the angle in degrees and radians.
Use the step-by-step work to check the dot product, magnitudes, and cosine value.
Angle Between Two Vectors Formula
For nonzero vectors a and b, the angle θ is found from the dot-product identity:
cos θ = (a · b) / (||a|| ||b||)
θ = arccos((a · b) / (||a|| ||b||))
The result is between 0° and 180°. The calculator clamps the cosine value to [-1, 1] before taking arccos to avoid floating-point rounding errors.
If your vectors are given by points, subtract the initial point from the terminal point first.
For example, if vector a goes from A(1, 2) to B(4, 6), then a = B - A = (4 - 1, 6 - 2) = (3, 4).
In 3D or 4D, use the same idea: subtract each starting coordinate from the matching ending coordinate. A 4D vector from A(x1, y1, z1, w1) to B(x2, y2, z2, w2) is (x2 - x1, y2 - y1, z2 - z1, w2 - w1).
What the Result Means
0°: vectors point in the same direction.
90°: vectors are perpendicular; the dot product is 0.
180°: vectors point in opposite directions.
Acute angle: positive dot product.
Obtuse angle: negative dot product.
Cosine similarity: a normalized alignment score from -1 to 1.
Common Mistakes
Using a zero vector: If ||a|| = 0 or ||b|| = 0, the angle is undefined.
Forgetting to subtract points: Points are positions; vectors from points require terminal minus initial point.
Mixing units: Convert components to the same unit system before comparing directions.
Rounding too early: Keep extra precision until the final angle, especially for nearly parallel or opposite vectors.
Related Vector Calculators
For more vector work, use the related tools above to find vector projections, dot products, cross products, and 2D or 3D distances.
FAQ
How do you compute the angle between two vectors?
Use θ = arccos((a·b)/(||a||·||b||)) for nonzero vectors.
Can this calculator use points instead of components?
Yes. Choose Two points, enter the initial and terminal point for each vector, and the calculator converts each pair into a vector.
Does this work for 3D and 4D vectors?
Yes. Choose 3D or 4D to enter the matching number of components per vector or coordinates per point.
Is cosine similarity the same as the angle?
No. Cosine similarity is cos θ. The angle is found by taking arccos of that value.
🧭 5 Fun Facts about Vector Angles
1
Cosine works in any dimension
The same dot-over-magnitudes formula compares 2D arrows, 3D forces, or 1,536-D text embeddings—angle is dimension-agnostic.
Universal trick
2
Scaling can’t fool it
Multiply either vector by a positive number and the angle stays identical. That’s why cosine similarity ignores “loudness” and keeps only direction.
Scale-proof
3
Cross = sine detector
In 3D, ||a×b|| = ||a||·||b||·sin θ. Tiny cross magnitude? Nearly parallel. Max cross magnitude? Near 90° and the parallelogram area is huge.
Area insight
4
Sign reveals turning
In 2D, the scalar “cross” aₓbᵧ − aᵧbₓ is positive if you rotate counter-clockwise from a to b, negative if clockwise—a quick left/right test.
Orientation check
5
Slerp rides the angle
Smooth rotations (spherical linear interpolation) literally move along the angle between directions. Flight sims and VR cameras use this for buttery turns.