Angle Between Two Vectors Calculator

THE ANGLE BETWEEN THEM
Type two vectors, one after the other.
The working, the exact cosine, and the check
Your two vectors
Put each vector in brackets, one after the other: <3, 4> . <1, 2>. The dot between them is optional. Two or three components, and fractions stay exact. Holding deletes one character after another.
The answer always lands between and 180°, because that is the whole range an inverse cosine returns. There is no such thing as a negative angle between two vectors.
Tap a box, then use the keys
The angle comes from cos θ = (a · b) ÷ (|a| |b|). That division is where most calculators fail on parallel vectors, because in decimals it slips past 1 and the inverse cosine of anything above 1 is not a number. Here it is checked in whole numbers first.
How the angle is found

This angle between two vectors calculator gives the answer in degrees and radians together, keeps the cosine as an exact surd, and never returns an error for the case that trips most other tools.

Type <1, 0> . <1, 1> and you get exactly 45° — not 45.0000, which leaves you guessing whether it really is 45.

One Formula, and Everything Else Is Filling It In

cos θ = (a · b) ÷ (|a| |b|)

One line, and it is the whole method. It comes from the other way of writing a dot product — a · b = |a| |b| cos θ — with the angle moved to one side.

Above the line: the matching components multiplied and added. Below it: each vector's own length, from Pythagoras. Divide, take the inverse cosine, done.

The Sign Tells You the Answer Before You Have It

A length is never negative, so whatever sign the fraction carries came from the top of it — and that one fact tells you a great deal before any arithmetic.

Positive and the angle is under 90°. Negative and it is over. Zero and it is a right angle exactly. You can say which of those you are heading for by glancing at one number, which is a useful check on whatever your calculator eventually shows.

Why Parallel Vectors Break Other Calculators

Take ⟨1, 2, 3⟩ and ⟨2, 4, 6⟩. Same direction, one twice as long. The angle is obviously 0°.

Work it out in ordinary decimals and the fraction comes to 1.0000000000000002. An inverse cosine cannot take anything above 1, so the page returns NaN, or an error, or nothing at all — for a question a child could answer by looking at it.

That is not a rare edge. Put twenty thousand pairs of parallel vectors with whole-number components through the decimal route and 3,706 of them fail. Nearly one in five.

This page compares (a · b)² against (a · a)(b · b) in whole numbers before it goes anywhere near an inverse cosine. Mathematics guarantees the first is never the larger; doing the comparison exactly is what carries that guarantee into the code.

The two vectorscos θThe angle
along the same line, together 1
leaning the same way between 0 and 1 under 90°
at right angles 0 90°
leaning apart between −1 and 0 over 90°
along the same line, opposed −1 180°

Where Anyone Actually Needs This Angle

Rarely for its own sake. Almost always as a step towards something else.

A force pushing a crate along a floor at some angle to the motion does work equal to the force times the distance times the cosine of that angle. So the angle is what decides how much of the push is useful and how much is wasted pressing down into the floor.

Computer graphics leans on the same quantity constantly. How brightly a surface is lit depends on the angle between the light and the surface, and that runs millions of times a second inside any game you have played. It is done on unit vectors, because when both lengths are already 1 the division disappears and the cosine is simply the product itself — which is exactly why graphics code normalises everything first.

Navigation, structural engineering, the similarity between two documents in a search engine, the shortest route between two bearings on a chart. Same fraction, different clothes.

Always Between 0° and 180°

An inverse cosine returns nothing outside that range, and it is the right range to have.

Two arrows can point together, at right angles, or in opposite directions, . Widest apart they can ever be is a straight line. So there is no negative angle between vectors and no 250°. If your working produced one, a sign went astray earlier.

Order makes no difference either. The top of the fraction is the same whichever vector you write first, and the bottom obviously is, so the angle is too.

Vectors, or the Lines They Lie On?

Worth knowing, because questions ask for both and mean different things.

⟨1, 0⟩ and ⟨−1, 1⟩ are 135° apart as vectors. But the two lines they lie along cross at 45°, because a line has no arrowhead and does not care which way you travel down it.

Whenever the vector answer is obtuse, this page prints the acute figure underneath it. Which one the question wants is usually clear from whether it says "vectors" or "lines".

Radians Are Not a Different Answer

45° and 0.785398 are the same angle written two ways, and a calculator left in the wrong mode is the commonest reason a correct method produces a wrong-looking number.

Degrees for geometry questions, radians almost everywhere in calculus and physics. Both appear here side by side so there is nothing to convert and nothing to switch.

How to Use This Angle Between Two Vectors Calculator

Two vectors, each inside its own brackets: <3, 4> . <1, 2>. Whether you put a dot between them makes no difference. Three components work as readily as two, and a fraction typed in comes back out as a fraction.

Results come back in both units, the cosine left as a root wherever that is possible, and what kind of angle it is. Show the working opens the fraction built up piece by piece: the top from the components, the bottom from the two lengths, and the inequality that makes the answer safe.

The top of that fraction is worked through in detail on the dot product page, and the two lengths on the magnitude and direction page. If the pair came out of a question that first asked you to combine them, that step is vector addition. Nothing is printed until several checks have passed, including that the cosine squared matches the exact ratio it should and that the result really lies between 0° and 180°.

Angle Between Two Vectors Calculator FAQ

How do you find the angle between two vectors?
Divide the dot product by the two lengths multiplied together, then take the inverse cosine. For (3, 4) and (1, 2) that gives about 10.30°.
What is the formula for the angle between two vectors?
cos θ = a · b ÷ (|a| |b|). It comes from rearranging a · b = |a| |b| cos θ.
Can the angle between two vectors be more than 180 degrees?
No. The inverse cosine only returns values from 0 to 180°, and that is the correct range: the angle between two arrows cannot be more than a straight line.
Why does my calculator give an error for parallel vectors?
Because in decimal arithmetic the cosine comes out as 1.0000000000000002 instead of 1, and the inverse cosine of anything above 1 is undefined. The answer should simply be 0°.
What is the angle between two perpendicular vectors?
90°, and their dot product is exactly zero. If the top of the fraction comes to zero the cosine is zero, and the inverse cosine of zero is a right angle.
Is the angle the same whichever vector you name first?
Yes. The dot product does not care about order and neither do the two lengths, so the fraction is identical either way. There is no such thing as a negative angle between vectors.
How do you find the angle between two 3D vectors?
Exactly the same way, with a third component in the dot product and in both lengths. For (1, 2, 3) and (4, 5, 6) the angle is about 12.93°.
What is the difference between the angle between two vectors and between two lines?
A line has no direction, so the angle between two lines is always taken as the acute one. If two vectors are 135° apart, the lines they lie along are 45° apart.

Divide, take the inverse cosine, and check the answer landed between 0° and 180°.