Angle Between Two Vectors Calculator

The Angle Between Two Vectors Calculator finds the angle separating two 3D vectors using the dot product and their magnitudes. The formula used is: θ = cos⁻¹[(A·B) ÷ (|A||B|)]. Results are given in degrees and radians.

Formula

θ = cos⁻¹[(A·B) ÷ (|A||B|)]
  • The Angle Between Two Vectors Calculator updates instantly when you change any component.
  • Formula: θ = cos⁻¹[(A·B) ÷ (|A||B|)]
  • Input definitions: • Vector A (x, y, z): the components of the first vector • Vector B (x, y, z): the components of the second vector
  • The dot product A·B = axbx + ayby + azbz, and each magnitude is the square root of the sum of its squared components.
  • An angle of 0° means the vectors point the same way, 90° means they are perpendicular, and 180° means they point in opposite directions.
  • Practical tip: a dot product of zero is a quick test that two vectors are perpendicular.

Example Calculation

Inputs
  • Vector A - x: 2
  • Vector A - y: 3
  • Vector A - z: 1
  • Vector B - x: 4
  • Vector B - y: 1
  • Vector B - z: 2

For A = (2, 3, 1) and B = (4, 1, 2), A·B = 8 + 3 + 2 = 13, |A| = √14 ≈ 3.742 and |B| = √21 ≈ 4.583. So θ = cos⁻¹(13 ÷ 17.15) ≈ 40.7°.

Frequently asked questions

How do you find the angle between two vectors?
Divide their dot product by the product of their magnitudes, then take the inverse cosine: θ = cos⁻¹[(A·B) ÷ (|A||B|)].
What does the result tell me?
0° means the vectors are parallel, 90° means they are perpendicular, and 180° means they point in opposite directions.
What units should I enter?
Enter the x, y, and z components of each vector in any consistent unit. The angle is returned in degrees and radians.
Can I use it for 2D vectors?
Yes — set the z components to 0 and the formula reduces to the 2D case.
How accurate are the results?
The angle is computed directly from the dot product and rounded only for display.
How can I verify the calculation manually?
Use the displayed formula and work through the numbers step by step. If your manual result differs slightly, check rounding and unit conversions first.
Can I use this for planning and budgeting?
Yes. Run best-case, expected, and worst-case inputs to compare outcomes and make safer planning decisions.