Angle Between Two Vectors
Divide the dot product by the product of the magnitudes to get the cosine, then take the inverse cosine. A zero dot product means perpendicular; positive means broadly aligned; negative means broadly opposed.
Your numbers
Angle (°)
48.18°
cos
0.6668
Result
17
What it means
At 48.18° they point broadly the same way.
Formula
Angle (°) = acos((A.x × B.x + A.y × B.y) ÷ (|A| × |B|))
The angle is undefined if either vector is zero. This calculator returns zero in that case.
What to enter
| Input | Default | Accepted range |
|---|---|---|
| A.xThe horizontal component of the first vector. | 3 | No limit |
| A.yThe vertical component of the first vector. | 4 | No limit |
| B.xThe horizontal component of the second vector. | -1 | No limit |
| B.yThe vertical component of the second vector. | 5 | No limit |
Step by step
Quick reference table
Results when only A.x changes and everything else stays put.
| A.x | Angle (°) (°) | cos | Result |
|---|---|---|---|
| 1.5 | 31.866 | 0.8493 | 18.5 |
| 2.25 | 40.668 | 0.7585 | 17.75 |
| 3 | 48.18 | 0.6668 | 17 |
| 4.5 | 59.676 | 0.5049 | 15.5 |
| 6 | 67.62 | 0.3807 | 14 |
What each result means
| Result | At default values |
|---|---|
| Angle (°) (°)An angle in degrees; a full turn is 360°. | 48.18 |
| cosThe cosine of the angle — adjacent over hypotenuse. | 0.6668 |
| ResultWhat the formula gives back — the answer this page is for. | 17 |
Common mistakes
The angle is undefined if either vector is zero. This calculator returns zero in that case.
Glossary
- A.x
- The horizontal component of the first vector.
- A.y
- The vertical component of the first vector.
- B.x
- The horizontal component of the second vector.
- B.y
- The vertical component of the second vector.
- Angle (°)
- An angle in degrees; a full turn is 360°.
- cos
- The cosine of the angle — adjacent over hypotenuse.
- Result
- What the formula gives back — the answer this page is for.
Frequently asked questions
Q. How is Angle Between Two Vectors calculated?
Angle (°) = acos((A.x × B.x + A.y × B.y) ÷ (|A| × |B|)) — Divide the dot product by the product of the magnitudes to get the cosine, then take the inverse cosine. A zero dot product means perpendicular; positive means broadly aligned; negative means broadly opposed.
Q. Can you walk through an example?
With A.x 3, A.y 4, B.x -1, B.y 5, the answer is Angle (°) 48.18°.
Q. What do I need to enter?
Enter A.x, A.y, B.x, B.y. The result recalculates as you type, and an empty box counts as zero.
Q. How much does the answer move if I change a number?
Changing only A.x moves the answer to A.x 1.5 → Angle (°) (°) 31.866 and A.x 6 → Angle (°) (°) 67.62. The table below lays out five steps.
Q. How are the numbers rounded?
Money is shown to the nearest whole unit, percentages to one decimal place and everything else to two. What you see is rounded; the calculation itself carries the unrounded value forward.
Q. Anything to watch out for?
The angle is undefined if either vector is zero. This calculator returns zero in that case.
Related calculators
Keep your length units consistent across inputs — mixing centimetres and metres throws results far off.