Skip to main content

Angle Calculator

Convert degrees / radians / gradians or compute the angle between two 2D vectors.

Written by Golam Rabbani, Founder & Lead Engineer

How to use this angle calculator

  1. Pick a mode: Unit conversion (degrees ↔ radians ↔ gradians) or Angle between vectors (2D).
  2. For unit conversion, enter the angle value and select the source unit.
  3. For vector mode, enter the components of vectors u = (u₁, u₂) and v = (v₁, v₂).
  4. Press Calculate. Unit conversion returns the same angle in all three units; vector mode returns the angle plus dot and cross products.
  5. Use Copy to copy the result, or Reset to clear inputs.

About this angle calculator

The angle calculator handles two of the most common angle questions in geometry and physics. In unit-conversion mode it converts between degrees, radians, and gradians using the exact factors π rad = 180° = 200 gon. In vector mode it computes the angle between two 2D vectors using cos θ = (u · v) / (|u| · |v|), then returns θ in degrees, radians, and gradians.

As a worked example for unit conversion, entering 45 degrees returns 0.7853982 rad and 50 gon. As a worked example for vectors, entering u = (1, 0) and v = (0, 1) gives |u| = |v| = 1, dot product u · v = 0, cross product (z-component) u × v = 1, and cos θ = 0, so θ = 90° (or π/2 rad, 100 gon).

The vector mode also shows the signed cross-product z-component, which is positive when v lies counter-clockwise from u and negative when it lies clockwise. This is helpful for orientation tests in computer graphics, robotics, and computational geometry.

FAQ

What is a gradian?
A gradian (gon) is a unit where a right angle is 100 gon, so a full circle is 400 gon. It is mainly used in surveying and some European engineering.
Why does the vector mode return only a magnitude, not a signed angle?
The angle returned by arccos is always between 0 and 180°. The signed cross-product z-component is shown alongside so you can tell which side of u the vector v lies on.
What if I enter a zero vector?
The angle between a zero vector and anything is undefined. The tool detects this and shows an error instead of returning NaN.
How is the conversion accurate?
Internally everything is converted through radians using the exact ratio π / 180 (or π / 200 for gradians). Results are rounded to four decimal places by default.
Does it work for 3D vectors?
Currently the vector mode supports 2D vectors only. For 3D you can compute |u| and |v| manually and use the same cosine formula.
Is the calculator free and private?
Yes. All calculations are client-side. Nothing is sent to a server.