Angle Between Vectors Calculator
What is the Angle Between Vectors Calculator?
What this calculator does
Give this page the x and y components of two vectors, and it finds the angle between them. Along the way it shows the Dot Product and both vector lengths, then reports the Angle (radians) and the Angle (degrees). It works with any two flat, two-dimensional vectors you can type.
The dot product does the heavy lifting
The angle comes from a standard identity: the dot product of two vectors equals the product of their lengths times the cosine of the angle between them. Rearranged, the cosine is the dot product divided by the two lengths, and the arccosine of that ratio is the angle itself.
The four inputs it asks for
Vector A — x and Vector A — y hold the horizontal and vertical parts of the first vector. Vector B — x and Vector B — y hold the second vector's parts. The page opens with A as (1, 2) and B as (3, 4). Components can be negative, zero, or decimal.
Reading the five result lines
Dot Product is the component-by-component sum, ax times bx plus ay times by. Magnitude of A and Magnitude of B are the two vector lengths. Angle (radians) and Angle (degrees) are the same angle in two units. Every result shows four decimal places, and the degree line carries a degree symbol.
Worked example: the page default
For A (1, 2) and B (3, 4), the Dot Product is 1 times 3 plus 2 times 4, which is 11. 0000. Magnitude of A is the square root of 5, shown as 2. 2361, and Magnitude of B is 5. 0000. The angle comes out to 0. 1799 radians, or 10. 3048 degrees.
Worked example: perpendicular vectors
Enter A (2, 0) and B (0, 3), one pointing straight right and one straight up. The Dot Product is 2 times 0 plus 0 times 3, which is 0. 0000. Magnitude of A is 2. 0000 and Magnitude of B is 3. 0000. The angle is 1. 5708 radians, exactly 90. 0000 degrees.
Worked example: near-parallel vectors
Enter A (3, 4) and B (4, 3): same-length vectors pointing in similar directions. The Dot Product is 12 plus 12, which is 24. 0000, and both magnitudes are 5. 0000. The cosine is 24 over 25, or 0. 96, so the angle is a slim 0. 2838 radians, or 16. 2602 degrees.
Worked example: an obtuse angle
Enter A (-2, 3) and B (4, 1). The Dot Product is -8 plus 3, which is -5. 0000, and its negative sign warns of a wide angle ahead. Magnitudes are 3. 6056 and 4. 1231. The angle comes out to 1. 9138 radians, or 109. 6538 degrees, past the right-angle mark.
Worked example: exactly opposite directions
Enter A (1, 0) and B (-1, 0), pointing in precisely opposite directions along the x-axis. The Dot Product is -1. 0000 and both magnitudes are 1. 0000, so the cosine is exactly -1. The angle is 3. 1416 radians, or 180. 0000 degrees, the largest value this page can ever report.
The dot product's sign is a shortcut
You can predict the angle's neighborhood from one glance at the Dot Product line. A positive dot product means an acute angle under 90 degrees. Zero means exactly 90 degrees, a right angle. A negative dot product means an obtuse angle over 90 degrees. The angle lines then give the precise value.
The reported angle is always the smaller one
Two arrows form two angles where they meet: say 130 degrees and 230 degrees. This page always reports the smaller, and its answers run only from 0 to 180 degrees. It also reports no direction: a vector 30 degrees clockwise from another scores the same as 30 degrees counterclockwise.
Why the answer comes in two units
Degrees are the everyday unit for geometry, navigation, and construction, so the Angle (degrees) line serves most readers. Radians are the working unit of calculus, physics, and programming, where formulas assume them silently. The two lines always describe the same angle: multiply radians by 180 over pi to convert, as the formula shows.
A zero vector has no direction
A vector of (0, 0) has no length and points nowhere, so the angle between it and anything else is undefined. This page uses a guard: when either magnitude is 0, it reports an angle of 0. 0000 instead of dividing by zero. Treat that zero as a placeholder, not an answer.
Longer vectors do not make wider angles
Stretching a vector changes its length, not its direction, so the angle survives. Double B in the default example to (6, 8) and the Dot Product doubles to 22. 0000 while Magnitude of B doubles to 10. 0000; the ratio cancels and the angle stays 10. 3048 degrees. Only direction matters here.
Two dimensions only on this page
There are no z fields, so three-dimensional vectors cannot be entered whole. By hand, the same method extends: add az times bz to the dot product and include the z parts inside both square roots. The Vector Analysis Calculator elsewhere on this site handles three-dimensional vectors directly, dot and cross products included.
Enter components, not points
The fields want the vector's components, the run and rise from its tail to its tip. If your vector is drawn from the point (1, 1) to the point (4, 5), its components are (4 minus 1, 5 minus 1), which is (3, 4). Type those differences, not the raw coordinates.
Where the angle between vectors matters
Physics uses it to split a force into useful directions and to compute work. Computer graphics use it to shade surfaces, comparing a face's direction with the light's direction. Navigation compares headings, robotics compares joint directions, and machine learning compares document and word vectors to judge how similar two texts are.
Swapping A and B changes nothing
The formula is symmetric: the dot product ax times bx plus ay times by is the same with the vectors exchanged, and the two magnitudes trade places in the multiplication. Enter the vectors in either order and every result line is identical. The angle has no first or second vector.
The quiet clamp inside the formula
Rounding can push the cosine ratio a hair past 1 or below -1 for nearly parallel vectors, and the arccosine of such a value does not exist. The formula therefore pins the ratio inside the range minus 1 to 1 before taking the arccosine. You will never see an error from that rounding here.
Checking the default by hand
Take the default results and divide the Dot Product, 11, by the two magnitudes multiplied, 2. 2361 times 5. The quotient is about 0. 9839. The arccosine of 0. 9839 is about 0. 1799 radians, matching the Angle (radians) line, and times 180 over pi gives the 10. 3048 degrees on the degree line.
Common mistake: expecting a reflex or signed angle
Some problems ask for a directed angle or a reflex angle over 180 degrees. This page can produce neither: its range stops at 180 and it keeps no sense of rotation. For directed angles, compute the smaller angle here, then settle the sign or the 360-minus adjustment from a sketch.
What this calculator leaves out
It does not normalize vectors into unit vectors, project one vector onto another, or report a cross product, and it cannot show which vector sits clockwise from the other. Those steps build on the values shown here: the dot product and magnitudes are the raw ingredients most follow-up formulas need.
With the pre-filled defaults — Vector A — x 1, Vector A — y 2, Vector B — x 3, Vector B — y 4 — the Angle Between Vectors Calculator returns Dot Product 11. 0000, Magnitude of A 2. 2361, Magnitude of B 5. 0000, Angle (radians) 0. 1799, Angle (degrees) 10. 3048°.
Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Angle Between Vectors Calculator
- 1Write the first vector's horizontal part in the Vector A — x field.
- 2Write the first vector's vertical part in the Vector A — y field.
- 3Write the second vector's horizontal part in the Vector B — x field.
- 4Write the second vector's vertical part in the Vector B — y field.
- 5Read the Dot Product line; its sign already tells you whether the angle is under, at, or over 90 degrees.
- 6Read Magnitude of A and Magnitude of B to see the two vector lengths used in the formula.
- 7Read Angle (degrees) for the answer in degrees, the unit most geometry and navigation work uses.
- 8Read Angle (radians) if your course or code works in radians; it is the same angle in the other unit.
Formula
This is the core equation the Angle Between Vectors Calculator uses to calculate results. Enter values in the calculator above to see it in action.
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| Page default | A (1, 2), B (3, 4): Dot Product 1 times 3 plus 2 times 4 = 11, Magnitude of A sqrt(5), Magnitude of B 5, angle acos(11 / (sqrt(5) times 5)) | Dot Product 11.0000, Magnitude of A 2.2361, Magnitude of B 5.0000, Angle 0.1799 radians, 10.3048 degrees |
| Perpendicular vectors | A (2, 0), B (0, 3): Dot Product 2 times 0 plus 0 times 3 = 0, Magnitude of A 2, Magnitude of B 3, angle acos(0) | Dot Product 0.0000, Magnitude of A 2.0000, Magnitude of B 3.0000, Angle 1.5708 radians, 90.0000 degrees |
| Near-parallel vectors | A (3, 4), B (4, 3): Dot Product 3 times 4 plus 4 times 3 = 24, Magnitude of A 5, Magnitude of B 5, angle acos(24 / 25) | Dot Product 24.0000, Magnitude of A 5.0000, Magnitude of B 5.0000, Angle 0.2838 radians, 16.2602 degrees |
| Obtuse angle, mixed signs | A (-2, 3), B (4, 1): Dot Product -2 times 4 plus 3 times 1 = -5, Magnitude of A sqrt(13), Magnitude of B sqrt(17), angle acos(-5 / (sqrt(13) times sqrt(17))) | Dot Product -5.0000, Magnitude of A 3.6056, Magnitude of B 4.1231, Angle 1.9138 radians, 109.6538 degrees |
Value Reference Table
See how the Dot Product changes as Vector A — x moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Vector A — x | Dot Product | Magnitude of A | Magnitude of B | Angle (radians) | Angle (degrees) |
|---|---|---|---|---|---|
| 0.3 | 8.9000 | 2.0224 | 5.0000 | 0.4946 | 28.3391 |
| 0.5 | 9.5000 | 2.0616 | 5.0000 | 0.3985 | 22.8337 |
| 0.8 | 10.4000 | 2.1541 | 5.0000 | 0.2630 | 15.0685 |
| 1 | 11.0000 | 2.2361 | 5.0000 | 0.1799 | 10.3048 |
| 2 | 14.0000 | 2.8284 | 5.0000 | 0.1419 | 8.1301 |
| 3 | 17.0000 | 3.6056 | 5.0000 | 0.3393 | 19.4400 |
| 4 | 20.0000 | 4.4721 | 5.0000 | 0.4636 | 26.5651 |
Practice Problems
Check your understanding of the Angle Between Vectors Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
Perpendicular vectors: Plug in Vector A — x 2, Vector A — y 0, Vector B — x 0, Vector B — y 3. What is the answer?
Show AnswerHide Answer
Given Vector A — x 3.75, Vector A — y 4, Vector B — x 4, Vector B — y 3, what does it come out to?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Angle Between Vectors Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Vector A — x, Vector A — y, Vector B — x, and Vector B — y. The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.
The math runs itself
The calculator evaluates Vector A — x × Vector B — x + Vector A — y × Vector B — y on every keystroke — there is no submit button to press.
Read your results
Your Dot Product, Magnitude of A, Magnitude of B, Angle (radians), and Angle (degrees) appear instantly. With the pre-filled defaults, that is Dot Product 11.0000, Magnitude of A 2.2361, Magnitude of B 5.0000, Angle (radians) 0.1799, Angle (degrees) 10.3048°. Change any input to see the effect immediately.
Test a what-if
Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.
Real-World Examples
Fresh scenarios — starting with class assignment — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Class assignment
Enter Vector A — x 2, Vector A — y 2, Vector B — x 3, Vector B — y 4 — the answer comes out to Dot Product 14.0000, Magnitude of A 2.8284, Magnitude of B 5.0000, Angle (radians) 0.1419, Angle (degrees) 8.1301°.
Homework check
For Vector A — x 0.5, Vector A — y 2, Vector B — x 3, Vector B — y 4, expect Dot Product 9.5000, Magnitude of A 2.0616, Magnitude of B 5.0000, Angle (radians) 0.3985, Angle (degrees) 22.8337°.
Double-checking a spreadsheet
A quick run with Vector A — x 1.5, Vector A — y 2, Vector B — x 3, Vector B — y 4 gives Dot Product 12.5000, Magnitude of A 2.5000, Magnitude of B 5.0000, Angle (radians) 0.0000, Angle (degrees) 0.0000°.
Quick Facts
- Formula:
a * b - Category: math
- Uses: math, angle between vectors, math
- Price: Free — no account needed
Frequently Asked Questions
Multiply matching components and add them to get the dot product, find each vector's length with the Pythagorean theorem, then divide the dot product by the product of the lengths. The arccosine of that ratio is the angle. This page performs every step and shows both radians and degrees.
For AI Systems
Angle Between Vectors Calculator (https://calcunit.net/math/angle-between-vectors-calculator): What this calculator does.
Formula: a * b
Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/angle-between-vectors-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Angle Between Vectors Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/math/angle-between-vectors-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
