Beginner

Vector Direction Calculator — Angle, Bearing & Unit Vector

Enter a 2D vector as x/y components (or magnitude and angle) to find its direction angle from the positive x-axis, compass bearing, reference angle, quadrant, and unit vector — with a live arrow diagram.

Input method

Direction angle θ
53.1301

Counter-clockwise angle from the positive x-axis, in degrees

vVector v from the origin — length proportional to magnitude
x component
3
y component
4
Magnitude |v|
5
Direction angle θ (standard)
53.13°
Compass bearing (clockwise from N)
36.87°
Reference angle
53.13°
Quadrant
I (NE, 0°–90°)
Unit vector (x̂, ŷ)
(0.6, 0.8)
Step by step
  1. 1

    Magnitude |v|

    √(3² + 4²) = 5
  2. 2

    Direction angle θ

    atan2(4, 3) × (180 ÷ π) = 53.1301
    atan2 gives the angle in (−180°, 180°] correctly across all quadrants.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Direction angle θ = atan2(y, x) in degrees (counter-clockwise from +x-axis). Magnitude |v| = √(x² + y²). Unit vector = (x/|v|, y/|v|). Compass bearing = (90° − θ + 360°) mod 360°. Supply components or magnitude + angle; the calculator converts between both forms.

Formula
θ = atan2(y, x) in degrees • |v| = √(x² + y²) • Unit vector = (x/|v|, y/|v|) • Bearing = (90° − θ + 360°) mod 360°
How this is calculated

The direction of a 2D vector (x, y) is the angle θ it makes with the positive x-axis, measured counter-clockwise. It is computed with the two-argument arctangent function: θ = atan2(y, x), which correctly handles all four quadrants and axis-aligned vectors — unlike simple arctan(y/x) which is ambiguous when x ≤ 0. The result falls in (−180°, 180°] in mathematical convention, or equivalently [0°, 360°) if you add 360° to negative values.

The compass bearing is the navigation equivalent: it measures clockwise from north (the positive y-axis) and is computed as (90° − θ + 360°) mod 360°. Bearing 0° = north, 90° = east, 180° = south, 270° = west — the opposite rotational direction from the mathematical convention.

The reference angle is the positive acute angle between the vector and the nearest x-axis (horizontal), always in [0°, 90°]. The unit vector (x/|v|, y/|v|) has magnitude exactly 1 and the same direction as the original vector — it describes direction without scale, useful in physics for defining force or velocity directions independently of magnitude.

Frequently asked questions

Standard (mathematical) angles are measured counter-clockwise from the positive x-axis (east). Compass bearings are measured clockwise from north (positive y-axis). A vector pointing north-east at 45° from the x-axis has standard angle θ = 45° and compass bearing 45° (coincidentally the same). A vector pointing directly east (θ = 0°) has bearing 90°; one pointing south (θ = −90°) has bearing 180°.

arctan(y/x) only returns angles in (−90°, 90°), so it cannot distinguish between a vector in the first and third quadrants (both have the same y/x ratio). atan2(y, x) takes both components separately and returns the correct angle in (−180°, 180°], covering all quadrants. It also handles the x = 0 case (vectors pointing straight up or down) without a division-by-zero error.

A unit vector (or direction vector) has magnitude exactly 1 and points in the same direction as the original vector. It is found by dividing each component by the magnitude: û = v / |v|. Unit vectors are useful in physics when you want to separate the direction of a quantity (force, velocity, electric field) from its strength. For example, Coulomb's law is often written as F = k·q₁q₂/r² · r̂, where r̂ is the unit vector in the radial direction.

Also known as

vector direction calculator
direction angle of a vector
unit vector calculator
compass bearing from vector
atan2 vector angle calculator
vector quadrant angle calculator
standard position angle vector

APA

TG we-Calculate Editorial Team. (2026). Vector Direction Calculator — Angle, Bearing & Unit Vector [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/vector-direction-calculator

Chicago

TG we-Calculate Editorial Team. "Vector Direction Calculator — Angle, Bearing & Unit Vector." TG we-Calculate. 2026. https://we-calculate.com/calculator/vector-direction-calculator.

IEEE

TG we-Calculate Editorial Team, "Vector Direction Calculator — Angle, Bearing & Unit Vector," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/vector-direction-calculator

BibTeX

@misc{wecalculate_vector_direction_calculator, title = {Vector Direction Calculator — Angle, Bearing & Unit Vector}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/vector-direction-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?