Angle Between Vectors Calculator
Enter the components of two vectors of equal length to find the angle between them in both degrees and radians.
Computed from the dot product formula
- 1
Dot product a·b
1×1 + 0×1 + 0×0 = 1 - 2
Magnitude |a|
√(1² + 0² + 0²) = 1 - 3
Magnitude |b|
√(1² + 1² + 0²) = 1.4142 - 4
cos θ = a·b ÷ (|a| × |b|)
1 ÷ (1 × 1.4142) = 0.7071 - 5
Angle θ = arccos(cos θ) × 180 ÷ π
arccos(0.7071) × 180 ÷ π = 45
How does this calculator work?
To find the angle between two vectors, take their dot product and divide by the product of their magnitudes to get cos θ, then apply arccosine. The result, between 0° and 180°, tells you whether the vectors are aligned (0°), perpendicular (90°), or opposed (180°).
Formula
How this is calculated
Enter vectors a and b as lists of numeric components separated by commas or spaces. Both vectors must have the same number of components (the same dimension) and neither can be the zero vector, since the angle is undefined when a magnitude is zero.
The calculator first computes the dot product a·b = Σ aᵢbᵢ and the magnitudes |a| = √(Σ aᵢ²) and |b| = √(Σ bᵢ²). The cosine of the angle is then cos θ = (a·b) / (|a| × |b|). This value is mathematically in [-1, 1], but floating-point rounding can push it slightly outside that range, so it is clamped to [-1, 1] before taking the inverse cosine.
Finally θ = arccos(cos θ) gives the angle in radians, which is converted to degrees with θ° = θ × 180 / π. The result is always between 0° and 180°: 0° means the vectors point the same way, 90° means they are perpendicular (orthogonal), and 180° means they point in opposite directions.
Frequently asked questions
The dot product is only defined for vectors of equal dimension, so both vectors must have the same number of components. If they differ, the calculator cannot compute an angle.
The arccosine function returns values from 0 to π radians (0° to 180°). This represents the smallest non-directional angle between the two vectors regardless of their orientation in space.
A 90° angle means the dot product is zero, so the vectors are orthogonal (perpendicular) to each other.
Also known as
TG we-Calculate Editorial Team. (2026). Angle Between Vectors Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/angle-between-vectors-calculator
TG we-Calculate Editorial Team. "Angle Between Vectors Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/angle-between-vectors-calculator.
TG we-Calculate Editorial Team, "Angle Between Vectors Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/angle-between-vectors-calculator
@misc{wecalculate_angle_between_vectors_calculator, title = {Angle Between Vectors Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/angle-between-vectors-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
