Azimuth Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter two points in decimal degrees to get the azimuth from the first to the second and the great-circle distance between them.
Result
Azimuth from true north (degrees, clockwise)
Great-circle distance (km)
- Great-circle distance (miles)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Start latitude (decimal degrees, north positive): enter a number from -90 to 90.
- Start longitude (decimal degrees, east positive): enter a number from -180 to 180.
- End latitude (decimal degrees): enter a number from -90 to 90.
- End longitude (decimal degrees): enter a number from -180 to 180.
- Read the result: Azimuth from true north (degrees, clockwise); the panel also shows Great-circle distance (km) and Great-circle distance (miles).
How this calculator works
Initial azimuth on a sphere: θ = atan2(sin Δλ × cos φ2, cos φ1 × sin φ2 − sin φ1 × cos φ2 × cos Δλ), where φ is latitude and λ longitude, converted to 0°-360° clockwise from true north.
Distance uses the haversine formula with the mean Earth radius of 6,371.0088 km (International Union of Geodesy and Geophysics). On the WGS 84 ellipsoid, results differ by up to about 0.5%. The bearing changes along a great circle, so this is the starting direction; a compass also needs your local magnetic declination.
The formula
| Symbol | Meaning | Unit |
|---|---|---|
| Start latitude (decimal degrees, north positive) | ||
| Start longitude (decimal degrees, east positive) | ||
| End latitude (decimal degrees) | ||
| End longitude (decimal degrees) | ||
| Azimuth from true north (clockwise) | degrees | |
deg(x) | the angle x, converted from radians to degrees. | |
atan2(y, x) | the angle, in radians, of the point (x, y) measured from the positive x-axis. | |
rad(x) | the angle x, converted from degrees to radians. |
Worked example
| Start latitude (decimal degrees, north positive) | 40.7128 |
|---|---|
| Start longitude (decimal degrees, east positive) | -74.006 |
| End latitude (decimal degrees) | 51.5074 |
| End longitude (decimal degrees) | -0.1278 |
| Great-circle distance (km) | 5,570.2299 |
|---|---|
| Great-circle distance (miles) | 3,461.1804 |
Azimuth from true north (degrees, clockwise) 51.2126
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is an azimuth?
The horizontal direction measured clockwise from true north: 0° is north, 90° east, 180° south and 270° west.
Why is the bearing from New York to London about 51° and not due east?
The shortest route is a great circle that curves north toward the pole, so it starts out heading northeast.