Angle Between Vectors Calculator

Measuring the Gap Between Two Directions

Two vectors describe two directions, and the angle between them is what the dot product was designed to reveal. Rearranging the dot product formula in terms of magnitudes and inverting the cosine turns a handful of component values into a clean angle in degrees.

The Formula

θ = acos( (A · B) / (|A| × |B|) )

Worked Example

For vectors A = (1, 0) and B = (1, 1):

Angle between vectors, step by step
StepCalculationResult
A · B(1×1) + (0×1)1
|A|√(1²+0²)1
|B|√(1²+1²)1.4142
θacos(1 / (1 × 1.4142))45°

Where This Matters

  • Similarity scoring — the angle (or its cosine) between two data vectors is a standard way to measure how similar two documents or recommendation profiles are.
  • Robotics and navigation — finding how far a heading vector must turn to align with a target direction.
  • Structural mechanics — the angle between a force vector and a member's axis determines how much of that force acts along the member.

How to Use This Calculator

  1. Choose the dimension: 2D Vectors or 3D Vectors.
  2. Enter Vector A's x, y (and z for 3D) components.
  3. Enter Vector B's x, y (and z for 3D) components.
  4. Select Calculate to get the angle between the two vectors, in degrees.

Related Calculations

This calculation builds on the Vector Dot Product Calculator and the Vector Magnitude Calculator.