Angle Between Two Vectors Calculator — Degrees, Radians & Classification

Find the angle between two vectors in 2D–6D using the dot product formula. Get degrees, radians, cos/sin/tan θ, perpendicularity and parallelism checks, computation steps, and a visual angle gauge.

Vector a

Vector b

Angle (degrees)
12.9332°
θ = cos⁻¹(0.974632)
Angle (radians)
0.225726 rad
12.93° × π/180
cos θ
0.974632
a·b / (‖a‖·‖b‖)
sin θ
0.223814
Sine of the angle between vectors
tan θ
0.229640
sin θ / cos θ
Dot Product
32.000000
Σ aᵢbᵢ = 4.00 + 10.00 + 18.00
Classification
Acute (< 90°)
Angle ≈ 12.9°
‖a‖
3.741657
Magnitude of vector a
‖b‖
8.774964
Magnitude of vector b

Angle Visual

12.9°
180°
AcuteRight (90°)Obtuse

Computation Steps

StepFormulaValue
1. Dot producta · b = Σ aᵢbᵢ32.000000
2. ‖a‖√(Σ aᵢ²)3.741657
3. ‖b‖√(Σ bᵢ²)8.774964
4. cos θ(a·b) / (‖a‖·‖b‖)0.974632
5. θ (radians)cos⁻¹(cos θ)0.225726
6. θ (degrees)θ × 180/π12.9332°

Component-wise Products

iaᵢbᵢaᵢ·bᵢ
11.00004.00004.0000
22.00005.000010.0000
33.00006.000018.0000
Sum32.0000

Reference Angles

Angle (°)Radianscos θMeaning
01Parallel (same direction)
45°π/4 ≈ 0.785≈ 0.707Half-way to perpendicular
90°π/2 ≈ 1.5710Perpendicular (orthogonal)
120°2π/3 ≈ 2.094−0.5Obtuse angle
180°π ≈ 3.142−1Anti-parallel (opposite)
Planning notes, formulas, and examples

About the Angle Between Two Vectors Calculator — Degrees, Radians & Classification

The angle between two vectors is one of the most frequently needed quantities in linear algebra, physics, and computer science. Given vectors a and b, the angle θ is found using the dot product relationship: cos θ = (a · b) / (‖a‖ ‖b‖). Taking the inverse cosine yields the angle in radians, easily converted to degrees by multiplying by 180/π.

This formula works in any number of dimensions — whether you are measuring the heading difference between two 2D velocity vectors, the angle between 3D surface normals, or the similarity of high-dimensional feature vectors in machine learning. The angle is always between 0° (parallel) and 180° (anti-parallel), with 90° indicating orthogonal vectors.

This calculator supports vectors from 2D up to 6D. Enter components for both vectors, or load one of six presets that cover key cases: a 45° pair, a 90° orthogonal pair, a 60° pair, an anti-parallel pair, and two general 3D examples. The output cards show the angle in degrees and radians, cos θ, sin θ, tan θ, the dot product, magnitudes, and an automatic classification as acute, right, or obtuse.

A color-coded angle gauge visualizes where the result falls on the 0°–180° scale, and a step-by-step computation table shows every intermediate value so you can verify or study the process. Reference and component-wise product tables round out the tool.

Understanding vector angles is critical for lighting in 3D graphics (Lambert's cosine law), navigation (bearing differences), robotics (joint angles), and data science (cosine similarity between document or embedding vectors).

When This Page Helps

Finding the angle between vectors requires computing dot products, magnitudes (with square roots), dividing, and applying the inverse cosine — a multi-step process where a single arithmetic slip produces a wrong angle. For higher-dimensional vectors (4D–6D), the computation grows even longer. This calculator shows the angle in both degrees and radians, classifies it as acute, right, or obtuse, reports cos/sin/tan θ, and checks orthogonality and parallelism. It is essential for physics students computing angles between forces, graphics programmers checking surface normals, and data scientists evaluating cosine similarity between feature vectors.

How to Use the Inputs

  1. Select vector dimension (2D through 6D)
  2. Enter vector a components in the first set of fields
  3. Enter vector b components in the second set of fields
  4. Or click a preset to load a common angle scenario
  5. Read the angle in degrees and radians, cos/sin/tan θ, and classification from output cards
  6. Use the angle gauge visual and computation steps table for deeper insight
Formula used
cos θ = (a · b) / (‖a‖ · ‖b‖); θ = cos⁻¹(cos θ)

Example Calculation

Result: θ = 45°

a · b = 1. ‖a‖ = 1, ‖b‖ = √2 ≈ 1.4142. cos θ = 1/√2 ≈ 0.7071. θ = cos⁻¹(0.7071) = 45° (π/4 rad). This is an acute angle.

Tips & Best Practices

  • cos θ = 0 means θ = 90° (orthogonal). This is the fastest perpendicularity test
  • cos θ = −1 means θ = 180° — the vectors point in exactly opposite directions
  • Cosine similarity in ML is simply cos θ — it ranges from −1 to 1 regardless of vector magnitudes
  • For 2D vectors, atan2 can give a signed angle (−180° to 180°), but the dot product formula always gives unsigned (0° to 180°)
  • The formula works identically in any dimension — there is no special case for nD

The Dot Product Formula for Vector Angles

The angle θ between vectors **a** and **b** is derived from the dot product identity: cos θ = (a · b) / (‖a‖ ‖b‖). The dot product a · b = Σ aᵢbᵢ sums the component-wise products, while ‖a‖ = √(Σ aᵢ²) is the Euclidean norm. Because the inverse cosine function returns values in [0, π], the angle is always between 0° (parallel) and 180° (anti-parallel). This formula generalizes seamlessly from 2D to any number of dimensions — the geometry of angles is dimension-independent.

Angle Classification and Special Cases

An angle of exactly 90° (cos θ = 0) means the vectors are **orthogonal** — their dot product is zero, which is the fastest perpendicularity test. Angles below 90° (positive dot product) are **acute**, meaning the vectors point in roughly the same direction. Angles above 90° (negative dot product) are **obtuse**, meaning they diverge. When cos θ = ±1, the vectors are parallel or anti-parallel. Recognizing these cases is crucial in physics (work = F·d·cos θ is zero for perpendicular force and displacement) and in machine learning (cosine similarity near 1 indicates highly similar vectors).

Applications Across Disciplines

In **3D graphics**, the angle between a surface normal and a light direction vector determines shading intensity via Lambert's cosine law. In **robotics**, joint angles between link vectors control arm positioning. In **NLP and recommendation systems**, cosine similarity (the normalized dot product) measures how closely two document or user-preference vectors align, regardless of their magnitudes. In **navigation**, the angle between velocity and heading vectors reveals course deviation. Understanding how to compute and interpret vector angles is fundamental across all quantitative disciplines.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • Compute cos θ = (a · b) / (‖a‖ ‖b‖), then take the inverse cosine. The result is in radians; multiply by 180/π for degrees.