Directions Calculator — Free Online Bearing and Compass Tool
Calculate the compass bearing, cardinal direction, and great-circle distance between any two geographic points.
Origin Point
Destination Point
Direction and Bearing
Compass Directions Reference Table
| Direction | Abbreviation | Bearing Range | Center Bearing |
|---|---|---|---|
| North | N | 348.75° - 11.25° | 0° / 360° |
| Northeast | NE | 33.75° - 56.25° | 45° |
| East | E | 78.75° - 101.25° | 90° |
| Southeast | SE | 123.75° - 146.25° | 135° |
| South | S | 168.75° - 191.25° | 180° |
| Southwest | SW | 213.75° - 236.25° | 225° |
| West | W | 258.75° - 281.25° | 270° |
| Northwest | NW | 303.75° - 326.25° | 315° |
Related Calculators
Distance Between Cities Calculator
Calculate the great-circle distance between any two locations worldwide.
Coordinates Calculator
Convert geographic coordinates between DD, DMS, and DMM formats.
Triangle Calculator
Solve a triangle's sides, angles, area, and perimeter from known values.
Right Triangle Calculator
Find missing sides and angles of a right triangle using trigonometry.
Speed Calculator
Calculate speed, distance, or time from any two of the three values.
Fuel Cost Calculator
Estimate fuel costs based on distance, MPG, and gas price.
About this calculator
Bearing Calculation Formula
θ = atan2(sin(Δlng) · cos(lat2), cos(lat1) · sin(lat2) - sin(lat1) · cos(lat2) · cos(Δlng)) Bearing = (θ · 180/π + 360) mod 360 Reverse Bearing = (Bearing + 180) mod 360 Variables Explained
- lat1, lat2: The latitudes of the origin and destination points, converted from degrees to radians for trigonometric computation. One radian equals approximately 57.296 degrees.
- Δlng: The difference in longitude between the destination and origin, in radians. This determines the east-west component of the bearing calculation.
- θ: The initial bearing angle in radians, computed using the atan2 function which correctly handles all four quadrants. The atan2 function returns values from -π to +π.
- atan2(y, x): The two-argument arctangent function that computes the angle from the positive x-axis to the point (x, y). Unlike atan(y/x), it correctly identifies the quadrant, avoiding ambiguity when both sine and cosine components are needed.
- Bearing: The final bearing in degrees, normalized to the range 0 to 360 by adding 360 and taking the modulo. This gives a compass heading where 0 degrees is true north, increasing clockwise.
- Reverse Bearing: The bearing from the destination back to the origin, calculated by adding 180 degrees to the initial bearing. This is a simplification; for the most accurate return heading at the destination point, a separate calculation using swapped coordinates is required.
Step-by-Step Example
Calculate the bearing from New York (40.7128° N, 74.0060° W) to Los Angeles (34.0522° N, 118.2437° W):
- Convert to radians: lat1 = 0.7106, lat2 = 0.5943, Δlng = -0.7721
- Calculate y: sin(-0.7721) × cos(0.5943) = -0.6976 × 0.8285 = -0.5780
- Calculate x: cos(0.7106) × sin(0.5943) - sin(0.7106) × cos(0.5943) × cos(-0.7721) = 0.4244 - 0.3872 = 0.0372
- Calculate θ: atan2(-0.5780, 0.0372) = -1.5064 radians
- Convert to degrees: -1.5064 × 180/π = -86.31°
- Normalize: (-86.31 + 360) mod 360 = 273.69° (W)
The initial bearing from New York to Los Angeles is approximately 273.69 degrees, which is nearly due west (W). This matches our intuition since Los Angeles is almost directly west of New York on the map. The reverse bearing would be about 93.69 degrees (nearly due east).
Sources
- Movable Type Scripts — Bearing and Geodesic Calculations: movable-type.co.uk/scripts/latlong.html
- NOAA National Geodetic Survey — Inverse Geodesic Computation: ngs.noaa.gov/TOOLS/Inv_Fwd
- NOAA National Hurricane Center — Distance Calculator: nhc.noaa.gov/gccalc.shtml
Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.
Last updated: November 3, 2026