This calculator finds the angle between two vectors in two or three dimensions using the dot product formula, the standard method used in physics, engineering, computer graphics and data science whenever you need to know how much two directions differ. Choose whether you are working in 2D or 3D, then enter the x, y (and z) components of vector A and vector B, for example forces, velocities or surface normals. The calculator works out the dot product of the two vectors and their magnitudes (lengths), divides one by the other to get the cosine of the angle, then takes the arccos to return the actual angle. Results appear as the angle in degrees and radians, the dot product, and a plain-English relationship such as parallel, perpendicular, acute or obtuse, so you can see at a glance how the vectors are oriented to each other. A working panel below shows every step, the dot product, both magnitudes, their product, cos(theta) and the final theta, so you can check the arithmetic or learn the method rather than just read off a number. Because the angle depends only on direction, not size, scaling a vector up or down never changes the result. Watch for the zero vector: if either vector has no length, the angle is mathematically undefined and the calculator flags this rather than showing a false answer.
The angle between two vectors is found using the dot product formula. For vectors A and B, the formula is:
theta = arccos( (A · B) / (|A| × |B|) )
where A · B is the dot product and |A| and |B| are the magnitudes of the vectors. The result is always between 0 and 180 degrees (0 and pi radians).
For vectors A = (1, 2, 3) and B = (4, 5, 6):
| Step | Calculation | Result |
|---|---|---|
| Dot product | (1×4) + (2×5) + (3×6) | 4 + 10 + 18 = 32 |
| Magnitude |A| | sqrt(1² + 2² + 3²) = sqrt(14) | 3.7417 |
| Magnitude |B| | sqrt(4² + 5² + 6²) = sqrt(77) | 8.7750 |
| Product |A|×|B| | 3.7417 × 8.7750 | 32.8327 |
| cos(theta) | 32 / 32.8327 | 0.97463 |
| Angle theta | arccos(0.97463) | 12.93 degrees (0.2257 rad) |
This matches the calculator default output above.
For 2D vectors A = (ax, ay) and B = (bx, by):
A · B = axbx + ayby
For 3D vectors A = (ax, ay, az) and B = (bx, by, bz):
A · B = axbx + ayby + azbz
| Angle | Dot Product | Relationship |
|---|---|---|
| 0 degrees | Positive maximum (= |A||B|) | Parallel (same direction) |
| 90 degrees | 0 | Perpendicular (orthogonal) |
| 180 degrees | Negative maximum (= -|A||B|) | Anti-parallel (opposite directions) |
For vectors A = (3, 4) and B = (1, 0):
A · B = 3×1 + 4×0 = 3. |A| = sqrt(9+16) = 5. |B| = 1. cos(theta) = 3/5 = 0.6. theta = arccos(0.6) = 53.13 degrees.
The angle between vectors is used in physics (force components, work = F·d×cos(theta)), computer graphics (lighting calculations, surface normals), machine learning (cosine similarity between document vectors), and engineering (structural analysis, navigation).
Sources and method: Dot product and angle formula from standard linear algebra. Anton, H. and Rorres, C. (2014). Elementary Linear Algebra. 11th ed. Wiley. Stewart, J. (2015). Calculus. 8th ed. Cengage. Formula: theta = arccos((A · B) / (|A||B|)) where the result is in the range [0, pi] radians.
This calculator computes the angle between two vectors using exact floating-point arithmetic. Results are rounded to four decimal places for display. The formula is valid for any non-zero vectors in 2D or 3D space. If either vector has zero magnitude, the angle is mathematically undefined.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-07-19 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.