Angle between two vectors
Find the unsigned angle from 0° to 180° between two nonzero vectors. Use z = 0 for 2D.
Formula
cos θ = (u·v)/(|u||v|); degrees = radians × 180/π.
Angle (radians) ≈ pi÷2-atan((0)÷max(1e-15,(1))) · Angle (degrees) ≈ (1.570796327)×180÷pi
How to use
- Enter the three components of u.
- Enter v; use z = 0 for 2D vectors.
- Read the angle in degrees and radians.
Examples
- (1,0,0) and (0,1,0) make a 90° angle.
Frequently asked questions
Can either vector be zero?
No. A zero vector has no direction, so its angle is undefined.
Is this a signed rotation?
No. It is the smaller unsigned angle from 0° to 180°.
Does vector length matter?
Positive scaling keeps the angle; reversing one vector changes its direction.
Sources
Updated: