Roboculator
Online CalculatorsCategoriesDate & EventsNews
Get Started
Online CalculatorsCategoriesDate & EventsNewsGet Started
Roboculator

Smart calculators for every challenge. Free, fast, and private.

Categories

  • Finance
  • Health
  • Math
  • Construction
  • Conversion
  • Everyday Life

Popular Tools

  • Date & Events
  • Loan Calculator
  • BMI Calculator
  • Percentage Calc
  • Latest News
  • Search All

Resources

  • Glossary
  • Topic Tags
  • News & Insights

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy
  • Disclaimer
© 2026 Roboculator. All rights reserved.
Roboculator

roboculator.com

  1. Home
  2. /Math
  3. /Linear Algebra Calculators
  4. /Angle Between Vectors Calculator

Angle Between Vectors Calculator

Last updated: April 5, 2026

The Angle Between Vectors Calculator finds the angle separating two 2D or 3D vectors using the dot product formula. Returns the angle in degrees and radians, confirms whether vectors are perpendicular or parallel — essential for physics, engineering, computer graphics, and linear algebra.

Calculator

Results

Dot Product

1

Magnitude of Vector A

1

Magnitude of Vector B

1.414214

Cosine of Angle

0.707107

Angle (Radians)

0.785398

rad

Results

Dot Product

1

Magnitude of Vector A

1

Magnitude of Vector B

1.414214

Cosine of Angle

0.707107

Angle (Radians)

0.785398

rad

In This Guide

  1. 01The Dot Product Formula for Angle
  2. 02Special Cases: Perpendicular and Parallel Vectors
  3. 03Physics Applications: Work, Torque, and Field Projections
  4. 04Computer Graphics: Lighting and Collision Detection

The calculator for the angle between vectors determines the geometric angle separating two vectors in 2D or 3D space using the dot product relationship. This calculation appears throughout physics (work, torque, field projections), engineering (force analysis), computer graphics (lighting calculations, collision detection), and linear algebra (orthogonality testing, projection).

The Dot Product Formula for Angle

The angle θ between vectors a and b is related to their dot product by:

cos(θ) = (a · b) / (|a| × |b|)    →    θ = arccos[(a · b) / (|a| × |b|)]

Where the dot product a · b = a₁b₁ + a₂b₂ + a₃b₃ and the magnitudes |a| = √(a₁² + a₂² + a₃²). This formula always returns an angle between 0° and 180°. For vectors a = (3, 4, 0) and b = (1, 0, 0): a · b = 3; |a| = 5; |b| = 1; cos(θ) = 0.6; θ = 53.13°. Use this online calculator for any vector pair in any dimension.

Special Cases: Perpendicular and Parallel Vectors

The dot product immediately reveals special geometric relationships:

  • Perpendicular (orthogonal): a · b = 0 → θ = 90° — the definition of orthogonality in vector spaces
  • Parallel (same direction): a · b = |a||b| → θ = 0°
  • Anti-parallel (opposite directions): a · b = −|a||b| → θ = 180°

Testing orthogonality by dot product is computationally efficient and the standard approach in computer graphics and numerical linear algebra for verifying that coordinate system axes remain perpendicular after rotations and transformations. The matrix multiplication calculator provides the matrix operations context in which vector dot products appear.

Physics Applications: Work, Torque, and Field Projections

The angle between vectors is the core of several fundamental physics calculations:

  • Work: W = F · d = |F||d|cos(θ) — maximum when parallel, zero when perpendicular
  • Torque magnitude: |τ| = |r||F|sin(θ) — maximum when force is perpendicular to the moment arm
  • Electric flux: Φ = E · A = EA cos(θ) — maximum when field is perpendicular to the surface

The matrix determinant calculator computes the cross product magnitude related to sin(θ) for torque and area vector calculations. The linear algebra calculators provide the complete toolkit for vector and matrix operations.

Computer Graphics: Lighting and Collision Detection

3D graphics engines use the angle between vectors extensively. Lambertian diffuse lighting: surface brightness is proportional to cos(θ) between the surface normal and light direction vector — surfaces facing the light appear bright, edge-on surfaces appear dark. Specular reflection requires the angle between the view vector and reflected light vector. Collision detection uses dot products to determine whether objects are approaching or separating. These applications make the dot product one of the most frequently computed operations in real-time 3D rendering.

Visual Analysis

How It Works

The angle is computed from the dot product formula:

$$\cos \theta = \frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{A}|\,|\mathbf{B}|} = \frac{x_1 x_2 + y_1 y_2 + z_1 z_2}{\sqrt{x_1^2 + y_1^2 + z_1^2}\;\sqrt{x_2^2 + y_2^2 + z_2^2}}$$

Then:

$$\theta = \arccos\left(\frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{A}|\,|\mathbf{B}|}\right)$$

The result is in radians, converted to degrees by multiplying by 180/π. The cosine value is clamped to [−1, 1] to handle floating-point edge cases. The orthogonality check tests whether |A · B| < 0.0001.

Understanding Your Results

The angle in degrees ranges from 0° to 180°. Values near 0° indicate nearly parallel vectors; near 90° indicates nearly perpendicular; near 180° indicates nearly opposite. The cosine ranges from −1 to 1: positive for acute angles, zero for right angles, negative for obtuse. The orthogonal indicator shows 1 if the vectors are perpendicular (within tolerance) and 0 otherwise. The dot product is provided for reference.

Worked Examples

45-Degree Angle

Inputs

x11
y10
z10
x21
y21
z20

Results

angle degrees45
angle radians0.785398
cos angle0.707107
dot product1
is orthogonal0

A · B = 1. |A| = 1, |B| = √2. cos θ = 1/√2 ≈ 0.7071. θ = arccos(1/√2) = 45° = π/4 radians.

Opposite Vectors

Inputs

x13
y14
z10
x2-3
y2-4
z20

Results

angle degrees180
angle radians3.141593
cos angle-1
dot product-25
is orthogonal0

A · B = −9 − 16 = −25. |A| = |B| = 5. cos θ = −25/25 = −1. θ = arccos(−1) = 180°. The vectors are anti-parallel (point in exactly opposite directions).

Frequently Asked Questions

No. The angle between two vectors is defined to be in the range [0°, 180°]. The arccos function always returns values in this range. If you need a signed angle (−180° to 180°), you need additional information such as a reference plane or normal vector to define the sign convention.

The angle is undefined when either vector is the zero vector, because the zero vector has no direction. The calculator returns 0° in this case to avoid errors, but the result has no geometric meaning. Always ensure your vectors are nonzero for meaningful angle calculations.

Two vectors are perpendicular (orthogonal) when their dot product is zero, which corresponds to an angle of exactly 90°. The calculator checks this condition using a tolerance of 0.0001 to handle floating-point imprecision and displays the result in the orthogonality indicator.

The arccos formula gives the unsigned angle between 0° and 180°. The atan2 function gives a signed angle between −180° and 180° but is typically used for 2D vectors relative to the x-axis. For the angle between two arbitrary 3D vectors, the arccos-based formula is the standard approach.

For very small angles (vectors nearly parallel), the arccos function can lose precision because cos θ ≈ 1 and the derivative of arccos approaches infinity. For higher precision with small angles, one can use the formula θ = 2 arcsin(|A−B|/2) with normalized vectors. For most practical applications, the standard formula is sufficiently accurate.

No. The angle between A and B is the same as the angle between B and A. This is because the dot product is commutative (A · B = B · A) and the cosine function is even (cos θ = cos(−θ)).

Sources & Methodology

Stewart, J. (2015). Calculus: Early Transcendentals (8th ed.). Cengage Learning. Anton, H. & Rorres, C. (2013). Elementary Linear Algebra: Applications Version (11th ed.). Wiley. Marsden, J. E. & Tromba, A. J. (2012). Vector Calculus (6th ed.). W. H. Freeman.

How helpful was this calculator?

5.0/5 (1 rating)

Related Calculators

Race Time Improvement Calculator

Marathon & Distance Running

Squat Calculator

Strength & Powerlifting Calculators

Deadlift Calculator

Strength & Powerlifting Calculators

Wilks Calculator

Strength & Powerlifting Calculators