Angle Between Two Vectors Calculator

Find the angle between two 2D or 3D vectors using θ=arccos((a·b)/(|a||b|)), the dot product formula.

📏 Angle Between Two Vectors Calculator
Angle (θ)
In radians
Dot product (a·b)
Step-by-step working

📏 What is the Angle Between Two Vectors Calculator?

This angle between two vectors calculator finds θ=arccos((a·b)/(|a||b|)), the angle formed between two vectors using the dot product formula. Choose 2D or 3D mode, enter the components of each vector, and it returns the angle in degrees and radians, plus the dot product and both magnitudes.

This calculator correctly identifies perpendicular vectors (dot product zero, θ=90°) and parallel vectors (θ=0° for same direction, θ=180° for opposite direction).

The dot product formula a·b=|a||b|cos(θ) is the geometric definition of the dot product, rearranged here to solve directly for the angle.

This calculator is useful for physics, engineering, and computer graphics students computing angles between force vectors, surface normals, or any pair of directional quantities.

📐 Formula

θ  =  arccos( (a·b) / (|a||b|) )
2D: a·b = axbx + ayby
3D: a·b = axbx + ayby + azbz
Example: a=(1,0), b=(0,1): θ = 90° exactly.

📖 How to Use This Calculator

Steps

1
Choose 2D or 3D mode.
2
Enter the components of vector a and vector b.
3
Read the angle.

💡 Example Calculations

Example 1 - Perpendicular 2D vectors

1
a=(1,0), b=(0,1), 2D mode
2
a·b = 1×0 + 0×1 = 0
3
θ = 90° exactly (dot product zero means perpendicular)
θ = 90°
Try this example →

Example 2 - Parallel 2D vectors (same direction)

1
a=(2,3), b=(4,6), 2D mode
2
b is exactly 2×a, so they point in the same direction
3
θ = exactly
θ =
Try this example →

Example 3 - 3D vectors

1
a=(1,1,1), b=(1,0,0), 3D mode
2
a·b = 1, |a|=√3, |b|=1
3
θ = 54.7356°
θ = 54.7356°
Try this example →

❓ Frequently Asked Questions

What is the angle between two vectors?+
The angle between two vectors is the angle θ (between 0° and 180°) formed at their shared origin, found from the dot product formula θ=arccos((a·b)/(|a||b|)), where a·b is the dot product and |a|, |b| are the vector magnitudes.
What is the formula for the angle between two vectors?+
θ = arccos((a·b)/(|a||b|)), derived directly from the geometric definition of the dot product, a·b=|a||b|cos(θ). This calculator works for both 2D and 3D vectors.
How do you compute the dot product?+
For 2D vectors, a·b = a_x·b_x + a_y·b_y. For 3D vectors, a·b = a_x·b_x + a_y·b_y + a_z·b_z, simply summing the products of corresponding components.
What does it mean if the dot product is zero?+
A dot product of zero means the two vectors are perpendicular (orthogonal), giving an angle of exactly 90°, regardless of the vectors' magnitudes, since cos(90°)=0.
What does a negative dot product mean?+
A negative dot product means the angle between the vectors is obtuse, greater than 90° (up to 180° for exactly opposite vectors), since cosine is negative for angles in that range.
What is the angle between two parallel vectors?+
Two vectors pointing in exactly the same direction (even with different magnitudes, like (2,3) and (4,6)) have an angle of exactly 0°, since one is a positive scalar multiple of the other, this calculator's parallel-vector example demonstrates this.
Can this formula give an angle greater than 180°?+
No, arccos always returns a value between 0° and 180°, this correctly represents the smaller of the two possible angles between two vectors (the reflex angle on the other side is simply 360° minus this result, but it isn't typically what "the angle between two vectors" refers to).
Does the formula work the same way in 2D and 3D?+
Yes, the dot product formula extends naturally to any number of dimensions, simply add more terms to the dot product sum and include the extra component in each vector's magnitude, exactly what switching to 3D mode does in this calculator.
What happens if one of the vectors has zero magnitude?+
The angle is undefined for a zero vector, since it has no direction to measure an angle from, this calculator flags that case with an error message rather than returning a meaningless result.
What are common applications of the angle between two vectors?+
This calculation is used throughout physics and engineering: finding the angle between force and displacement (for work calculations), computing angles between surface normals in 3D graphics and lighting, and determining similarity between data vectors in machine learning (cosine similarity).

What is the angle between two vectors?

The angle between two vectors is the angle θ (between 0° and 180°) formed at their shared origin, found from the dot product formula θ=arccos((a·b)/(|a||b|)), where a·b is the dot product and |a|, |b| are the vector magnitudes.

What is the formula for the angle between two vectors?

θ = arccos((a·b)/(|a||b|)), derived directly from the geometric definition of the dot product, a·b=|a||b|cos(θ). This calculator works for both 2D and 3D vectors.

How do you compute the dot product?

For 2D vectors, a·b = a_x·b_x + a_y·b_y. For 3D vectors, a·b = a_x·b_x + a_y·b_y + a_z·b_z, simply summing the products of corresponding components.

What does it mean if the dot product is zero?

A dot product of zero means the two vectors are perpendicular (orthogonal), giving an angle of exactly 90°, regardless of the vectors' magnitudes, since cos(90°)=0.

What does a negative dot product mean?

A negative dot product means the angle between the vectors is obtuse, greater than 90° (up to 180° for exactly opposite vectors), since cosine is negative for angles in that range.

What is the angle between two parallel vectors?

Two vectors pointing in exactly the same direction (even with different magnitudes, like (2,3) and (4,6)) have an angle of exactly 0°, since one is a positive scalar multiple of the other, this calculator's parallel-vector example demonstrates this.

Can this formula give an angle greater than 180°?

No, arccos always returns a value between 0° and 180°, this correctly represents the smaller of the two possible angles between two vectors (the reflex angle on the other side is simply 360° minus this result, but it isn't typically what 'the angle between two vectors' refers to).

Does the formula work the same way in 2D and 3D?

Yes, the dot product formula extends naturally to any number of dimensions, simply add more terms to the dot product sum and include the extra component in each vector's magnitude, exactly what switching to 3D mode does in this calculator.

What happens if one of the vectors has zero magnitude?

The angle is undefined for a zero vector, since it has no direction to measure an angle from, this calculator flags that case with an error message rather than returning a meaningless result.

What are common applications of the angle between two vectors?

This calculation is used throughout physics and engineering: finding the angle between force and displacement (for work calculations), computing angles between surface normals in 3D graphics and lighting, and determining similarity between data vectors in machine learning (cosine similarity).