Formula reference
2D direction angle
The two-argument arctangent preserves the correct quadrant.
Vector magnitude
Magnitude is always nonnegative.
3D direction angles
These angles are measured from the positive coordinate axes.
Angle between vectors
The result ranges from zero to a straight angle.
Projection
Projection measures the portion of one vector along another.
Azimuth and elevation
Azimuth turns horizontally while elevation tilts vertically.
How to use this calculator
- Select the calculation mode matching your known data.
- Choose the preferred angle unit, range, and precision.
- Enter vector components, points, angles, or matrix values.
- Press Calculate to display results above the form.
- Review formulas, graph output, validation, and JSON data.
- Copy, print, share, or export the completed calculation.
Direction-angle conventions
A mathematical direction angle is measured counterclockwise from the positive x-axis. A navigation bearing is measured clockwise from north. Azimuth usually describes horizontal rotation, while elevation describes vertical tilt.
Three-dimensional coordinate direction angles use the positive x, y, and z axes. Their direction cosines satisfy a unit-sphere identity. Signed output ranges can represent clockwise or negative angular displacement.
Common questions
Why is atan2 better than ordinary arctangent?
It uses both components and preserves the correct quadrant. It also handles vertical vectors without dividing by zero.
Why does the zero vector cause an error?
The zero vector has no unique direction. Its unit vector and direction angles are undefined.
Can the calculator use radians?
Yes. It also supports degrees, gradians, and degree-minute-second output.
What does a negative direction cosine mean?
It means the vector points partly opposite the corresponding positive axis.
How are parallel vectors detected?
The calculator checks whether the cross-product magnitude is near zero.
How are perpendicular vectors detected?
The calculator checks whether the dot product is near zero.