Mathematics, Statistics & Geometry

Angle Between Vectors Calculator

Calculate the angle between two 2D or 3D vectors. Find the dot product, magnitudes, and the angle in both degrees and radians instantly.

Angle (Degrees)
12.933
Angle (Radians)0.226
Dot Product32
Magnitude Vector 13.742
Magnitude Vector 28.775
Calculation StepsVector A = (1, 2, 3) Vector B = (4, 5, 6) Dot Product A·B = (1)(4) + (2)(5) + (3)(6) = 32 |A| = √(1² + 2² + 3²) = 3.741657 |B| = √(4² + 5² + 6²) = 8.774964 cos(θ) = (A·B) / (|A||B|) = 32 / (3.741657 * 8.774964) cos(θ) = 0.974632 θ = arccos(0.974632) = 12.9332°

Calculated locally in your browser. Fast, secure, and private.

Master Vector Geometry

The Angle Between Vectors calculator is a vital tool for physics, engineering, and computer graphics. Whether you are calculating the force distribution in a bridge truss or determining the lighting angle in a 3D scene, this tool provides the exact angular relationship between any two vectors.

θ=arccos(ABAB)\begin{aligned} \theta = \arccos\left(\frac{\mathbf{A} \cdot \mathbf{B}}{\|\mathbf{A}\| \|\mathbf{B}\|}\right) \end{aligned}

Where:
AB\mathbf{A} \cdot \mathbf{B}=
The sum of the products of the corresponding components
A\|\mathbf{A}\|=
The Euclidean length of the first vector
B\|\mathbf{B}\|=
The Euclidean length of the second vector

How to Calculate Vector Angles

To determine the angle θ between two vectors A and B:

  1. Calculate the Dot Product: Multiply corresponding components and add them together (x₁x₂ + y₁y₂ + z₁z₂).
  2. Calculate Magnitudes: Find the length of each vector using the Pythagorean theorem (√x² + y² + z²).
  3. Divide: Divide the dot product by the product of the magnitudes.
  4. Invert Cosine: Use the arccos function to find the angle.

Geometric Interpretations

  • θ = 0°: The vectors are pointing in the exact same direction (parallel).
  • θ = 90°: The vectors are perpendicular (orthogonal).
  • θ = 180°: The vectors are pointing in opposite directions (anti-parallel).

Applications in Science

  • Physics: Calculating the work done by a force acting at an angle to displacement.
  • Engineering: Analyzing stress and strain vectors in structural components.
  • Data Science: Using Cosine Similarity (the cosine of the angle) to measure how similar two data points are in high-dimensional space.

Frequently Asked Questions

To find the angle between two vectors, you calculate their dot product and divide it by the product of their magnitudes. The resulting value is the cosine of the angle. Taking the arccosine (inverse cosine) of this value gives you the angle in radians or degrees.

If the dot product of two non-zero vectors is exactly zero, the vectors are orthogonal (perpendicular) to each other, meaning the angle between them is 90° (π/2 radians).

No. By standard mathematical convention, the angle between two vectors is always expressed as the smallest angle between them, ranging from 0° to 180° (0 to π radians).

No. The angle from Vector A to Vector B is the same as the angle from Vector B to Vector A, because the dot product is commutative (A·B = B·A).

The formula is identical. In 2D, you only use X and Y components. In 3D, you include the Z component. Our calculator handles both by treating missing Z components as zero.