With this angle between two vectors calculator, you'll quickly learn how to find the angle between two vectors. It doesn't matter if your vectors are in 2D or 3D, nor if their representations are coordinates or initial and terminal points - our tool is a safe bet in every case. Play with the calculator and check the definitions and explanations below; if you're searching for the angle between two vectors formulas, you'll definitely find them there. Since you're here, hunting down solutions to your vector problems, can we assume that you're also interested in vector operations? Check Omni's other tools at the .
In this paragraph, you'll find the formulas for the angle between two vectors - and only the formulas. If you'd like to understand how we derive them, go directly into the next paragraph, .Angle between two 2D vectors
For vector a\boldsymbol aa: a=(xa,ya)\scriptsize \boldsymbol a = (x_a,y_a)a=(xa,ya) b=(xb,yb)\scriptsize \boldsymbol b = (x_b,y_b)b=(xb,yb) angle=arccos((xa⋅xb+ya⋅yb)/((xa2+ya2)12⋅(xb2+yb2)12))\scriptsize\begin{split} \mathrm{angle} &= \mathrm{arccos}\bigg(\Big(x_a\cdot x_b +y_a \cdot y_b\Big)\\ &\!\!\!\!\!\!\!\!\!/\Big(\big(x_a^2+y_a^2\big)^{\frac{1}{2}}\cdot\!\big(x_b^2+y_b^2\big)^{\frac{1}{2}}\Big)\bigg) \end{split}angle=arccos((xa⋅xb+ya⋅yb)/((xa2+ya2)21⋅(xb2+yb2)21))
For vector a\boldsymbol aa: A=(x1,y1,z1)\scriptsize A =(x_1,y_1,z_1)A=(x1,y1,z1) B=(x2,y2,z2)\scriptsize B =(x_2,y_2,z_2)B=(x2,y2,z2) So vector a\boldsymbol aa is: a=(x2−x1,y2,y1)\scriptsize\boldsymbol a = (x_2-x_1,y_2,y_1)a=(x2−x1,y2,y1) For vector b\boldsymbol bb: C=(x3,y3,z3)\scriptsize C =(x_3,y_3,z_3)C=(x3,y3,z3) D=(x4,y4,z4)\scriptsize D =(x_4,y_4,z_4)D=(x4,y4,z4) So vector b\boldsymbol bb is: b=(x4−x3,y4−y3)\scriptsize\boldsymbol{b}=(x_4-x_3,y_4-y_3)b=(x4−x3,y4−y3) angle=arccos(((x2−x1)⋅(x4−x3)+(y2−y1)⋅(y4−y3))/(((x2−x1)2+(y2−y1)2)12⋅((x4−x3)2+(y4−y3)2)12))\scriptsize\begin{split} \mathrm{angle} &= \mathrm{arccos}\bigg(\Big((x_2-x_1)\cdot(x_4-x_3)\\ &\!\!\!\!\!\!\!\!\!+(y_2-y_1)\cdot(y_4-y_3)\Big)\\ &\!\!\!\!\!\!\!\!\!/\Big(\big((x_2-x_1)^2+(y_2-y_1)^2\big)^{\frac{1}{2}}\\ &\!\!\!\!\!\!\!\!\!\cdot\!\big((x_4-x_3)^2+(y_4-y_3)^2\big)^{\frac{1}{2}}\Big)\bigg) \end{split}angle=arccos(((x2−x1)⋅(x4−x3)+(y2−y1)⋅(y4−y3))/(((x2−x1)2+(y2−y1)2)21⋅((x4−x3)2+(y4−y3)2)21)) Angle between two 3D vectors
a=(xa,ya,za)\scriptsize\boldsymbol a = (x_a,y_a,z_a)a=(xa,ya,za) b=(xb,yb,zb)\scriptsize\boldsymbol b = (x_b,y_b,z_b)b=(xb,yb,zb) angle=arccos((xa⋅xb+ya⋅yb+za⋅zb)/((xa2+ya2+za2)12⋅(xb2+yb2+zb2)12))\scriptsize \begin{split} &\mathrm{angle} \!=\! \mathrm{arccos}\bigg((x_a\cdot x_b+y_a\cdot y_b+z_a\cdot z_b)\\ &\!\!/\Big(\big(x_a^2+y_a^2+z_a^2\big)^{\frac{1}{2}}\cdot\big(x_b^2+y_b^2+z_b^2\big)^{\frac{1}{2}}\Big)\bigg) \end{split}angle=arccos((xa⋅xb+ya⋅yb+za⋅zb)/((xa2+ya2+za2)21⋅(xb2+yb2+zb2)21))
For vector a\boldsymbol{a}a: A=(x1,y1,z1)\scriptsize A = (x_1,y_1,z_1)A=(x1,y1,z1) B=(x2,y2,z2)\scriptsize B =(x_2,y_2,z_2)B=(x2,y2,z2) a=(x2−x1,y2−y1,z2−z1)\scriptsize\boldsymbol{a} = (x_2-x_1,y_2-y_1,z_2-z_1)a=(x2−x1,y2−y1,z2−z1) For vector b\boldsymbol{b}b: C=(x3,y3,z3)\scriptsize C = (x_3,y_3,z_3)C=(x3,y3,z3) D=(x4,y4,z4)\scriptsize D =(x_4,y_4,z_4)D=(x4,y4,z4) b=(x4−x3,y4−y3,z4−z3)\scriptsize\boldsymbol{b}=(x_4-x_3,y_4-y_3,z_4-z_3)b=(x4−x3,y4−y3,z4−z3) Find the final formula analogically to the 2D version: angle=arccos(((x2−x1)⋅(x4−x3)+(y2−y1)⋅(y4−y3)+(z2−z1)⋅(z4−z3))/(((x2−x1)2+(y2−y1)2+(z2−z1)2)12⋅((x4−x3)2+(y4−y3)2+(z4−z3)2)12))\scriptsize\begin{split} \mathrm{angle} &= \mathrm{arccos}\bigg(\Big((x_2-x_1)\cdot(x_4-x_3)\\ &\!\!\!\!\!\!\!\!+(y_2-y_1)\cdot(y_4-y_3)+(z_2-z_1)\\ &\!\!\!\!\!\!\!\!\cdot(z_4-z_3)\Big)/\Big(\big((x_2-x_1)^2+(y_2-y_1)^2\\ &\!\!\!\!\!\!\!\!+(z_2-z_1)^2\big)^{\frac{1}{2}}\!\cdot\!\big((x_4-x_3)^2+(y_4-y_3)^2\\ &\!\!\!\!\!\!\!\!+(z_4-z_3)^2\big)^{\frac{1}{2}}\Big)\bigg) \end{split}angle=arccos(((x2−x1)⋅(x4−x3)+(y2−y1)⋅(y4−y3)+(z2−z1)⋅(z4−z3))/(((x2−x1)2+(y2−y1)2+(z2−z1)2)21⋅((x4−x3)2+(y4−y3)2+(z4−z3)2)21)) Also, it is possible to have one angle defined by coordinates, and the other defined by a starting and terminal point, but we won't let that obscure this section even further. All that matters is that our angle between two vectors calculator has all possible combinations available to you.
OK, the above paragraph was a bit of a TL;DR. As a way of better understanding the formulas for the angle between two vectors, let's check where they come from:
a⋅b=∣a∣×∣b∣×cos(α)\boldsymbol{a}\cdot\boldsymbol{b} = |\boldsymbol{a}|\times|\boldsymbol{b}|\times \cos(\alpha)a⋅b=∣a∣×∣b∣×cos(α)
cos(α)=(a⋅b∣a∣×∣b∣)\scriptsize\cos(\alpha) = \left(\frac{\boldsymbol{a}\cdot\boldsymbol{b}}{|\boldsymbol{a}|\times|\boldsymbol{b}|}\right)cos(α)=(∣a∣×∣b∣a⋅b) Find the inverse cosine of both sides: α=arccos(a⋅b∣a∣×∣b∣)\scriptsize\alpha = \mathrm{arccos}\left(\frac{\boldsymbol{a}\cdot\boldsymbol{b}}{|\boldsymbol{a}|\times|\boldsymbol{b}|}\right)α=arccos(∣a∣×∣b∣a⋅b)
Did you notice that it's the same formula as the one used in the distance calculator? And that it comes directly from geometry — learn how with the Pythagorean theorem calculator?
If vectors a\boldsymbol{a}a and b\boldsymbol{b}b are, respectively: a=(xa,ya)\scriptsize\boldsymbol{a} = (x_a,y_a)a=(xa,ya) b=(xb,yb)\scriptsize\boldsymbol{b} = (x_b,y_b)b=(xb,yb) α=arccos((xa⋅xb+ya⋅yb)/((xa2+ya2)12⋅(xb2+yb2)12))\scriptsize \begin{split} &\alpha = \mathrm{arccos}\bigg(\Big(x_a\cdot x_b+y_a \cdot y_b\Big)\\ &/\Big(\big(x_a^2+y_a^2\big)^{\frac{1}{2}}\!\cdot\!\big(x_b^2+y_b^2\big)^{\frac{1}{2}}\Big)\bigg) \end{split}α=arccos((xa⋅xb+ya⋅yb)/((xa2+ya2)21⋅(xb2+yb2)21))
If vectors a\boldsymbol{a}a and b\boldsymbol{b}b are, respectively: a=(xa,ya,za)\scriptsize\boldsymbol{a} = (x_a,y_a,z_a)a=(xa,ya,za) b=(xb,yb,zb)\scriptsize\boldsymbol{b} = (x_b,y_b,z_b)b=(xb,yb,zb) α=arccos((xa⋅xb+ya⋅yb+za⋅zb)/((xa2+ya2+za2)12⋅(xb2+yb2+zb2)12))\scriptsize \begin{split} &\alpha = \mathrm{arccos}\bigg(\Big(x_a\cdot x_b+y_a \cdot y_b +z_a\cdot z_b\Big)\\ &/\Big(\big(x_a^2+y_a^2+z_a^2\big)^{\frac{1}{2}}\!\cdot\!\big(x_b^2+y_b^2+z_b^2\big)^{\frac{1}{2}}\Big)\bigg) \end{split}α=arccos((xa⋅xb+ya⋅yb+za⋅zb)/((xa2+ya2+za2)21⋅(xb2+yb2+zb2)21)) And that's it! Additionally, if your vectors are in a different form (you know their initial and terminal points), you'll need to perform some calculations beforehand. The aim is to reduce them into standard vector notation. If your example vector is described by the initial point B=(x1,y1)B=(x_1, y_1)B=(x1,y1) and the terminal point B=(x2,y2)B=(x_2, y_2)B=(x2,y2), then vectora\boldsymbol{a}a may be expressed as: a=(x2−x1,y2−y1)\scriptsize\boldsymbol{a} = (x_2-x_1,y_2-y_1)a=(x2−x1,y2−y1) Still not making sense? No worries! We've prepared some exemplary calculations to make sure it's as clear as crystal.
Assume that we want to find the angle between two vectors: a=(3,6,1)\scriptsize\boldsymbol{a} = (3, 6, 1)a=(3,6,1) and b\boldsymbol{b}b defined as the vector between point A=(1,1,2)A = (1, 1, 2)A=(1,1,2) and B=(−4,−8,6)B = (-4, -8, 6)B=(−4,−8,6). What do we need to do?
b=(−4−1,−8−1,6−2)=(−5,−9,4)\scriptsize\boldsymbol{b} = (-4-1,-8-1,6-2) = (-5,-9,4)b=(−4−1,−8−1,6−2)=(−5,−9,4)
a⋅b=(3×−5)+(6×−9)+(1×4)=−15−54+4=−65\scriptsize \begin{split} \boldsymbol{a}\cdot\boldsymbol{b}&= (3 \times -5) + (6 \times-9) + (1\times 4)\\ & = -15 - 54 + 4 = -65 \end{split}a⋅b=(3×−5)+(6×−9)+(1×4)=−15−54+4=−65
∣a∣=32+62+12=46≈6.782\scriptsize\begin{split} |\boldsymbol{a}|&=\sqrt{3^2+6^2+1^2}\\ &=\sqrt{46}\approx6.782 \end{split}∣a∣=32+62+12=46≈6.782 ∣b∣=(−5)2+(−9)2+42=122≈11.045\scriptsize\begin{split} |\boldsymbol{b}|&=\sqrt{(-5)^2+(-9)^2+4^2}\\ &=\sqrt{122}\approx11.045 \end{split}∣b∣=(−5)2+(−9)2+42=122≈11.045
α=arccos(a⋅b∣a∣×∣b∣)=arccos(−656.782×11.045)=arccos(−0.86767)=150.189°≈150.2°\scriptsize\begin{split} \alpha &= \mathrm{arccos}\left(\frac{\boldsymbol{a}\cdot\boldsymbol{b}}{|\boldsymbol{a}|\times|\boldsymbol{b}|}\right) \\[1em] &=\mathrm{arccos}\left(\frac{-65}{6.782\times11.045}\right) \\[1em] &=\mathrm{arccos}(-0.86767) \\[1em] &=150.189\degree\approx150.2\degree \end{split}α=arccos(∣a∣×∣b∣a⋅b)=arccos(6.782×11.045−65)=arccos(−0.86767)=150.189°≈150.2° And there you go! You've just calculated the angle between two 3D vectors. Congratulations! If you want to learn more coordinate geometry concepts, we recommend checking the average rate of change calculator.
So, how does our angle between two vectors calculator work? Follow these step-by-step instructions:
A vector is a representation of a physical quantity that has both magnitude and direction.
The angle formed between two vectors is defined using the inverse cosine of the dot products of the two vectors and the product of their magnitudes.
To calculate the angle between two vectors in a 2D space:
Mathematically, angle α between two vectors can be written as:
To calculate the angle between two vectors in a 3D space:
Mathematically, angle α between two vectors can be written as: |