Home·Geometry

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

InputDefaultAccepted range
A.xThe horizontal component of the first vector.3No limit
A.yThe vertical component of the first vector.4No limit
B.xThe horizontal component of the second vector.-1No limit
B.yThe vertical component of the second vector.5No limit

Step by step

FormulaAngle (°) = acos((A.x × B.x + A.y × B.y) ÷ (|A| × |B|))
With the default numbersAngle (°) = acos((3 × -1 + 4 × 5) ÷ (|A| × |B|))
AnswerAngle (°) = 48.18 °

Quick reference table

Results when only A.x changes and everything else stays put.

A.xAngle (°) (°)cosResult
1.531.8660.849318.5
2.2540.6680.758517.75
348.180.666817
4.559.6760.504915.5
667.620.380714

What each result means

ResultAt 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.