Skip to content
FiftyCalc Free calculators for all 50 states

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

Sample figures

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.

Azimuth Calculator

Start latitude (decimal degrees, north positive): enter a number from -90 to 90. Prefilled example: 40.7128.

Start longitude (decimal degrees, east positive): enter a number from -180 to 180. Prefilled example: -74.006.

End latitude (decimal degrees): enter a number from -90 to 90. Prefilled example: 51.5074.

End longitude (decimal degrees): enter a number from -180 to 180. Prefilled example: -0.1278.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Start latitude (decimal degrees, north positive): enter a number from -90 to 90.
  2. Start longitude (decimal degrees, east positive): enter a number from -180 to 180.
  3. End latitude (decimal degrees): enter a number from -90 to 90.
  4. End longitude (decimal degrees): enter a number from -180 to 180.
  5. 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

  1. Az=(deg⁡(atan2⁡(sin⁡(rad⁡(lon−lo))×cos⁡(rad⁡(la)),cos⁡(rad⁡(l))×sin⁡(rad⁡(la))−sin⁡(rad⁡(l))×cos⁡(rad⁡(la))×cos⁡(rad⁡(lon−lo))))+360)mod360
Symbols used in the formula
SymbolMeaningUnit
lStart latitude (decimal degrees, north positive)
loStart longitude (decimal degrees, east positive)
laEnd latitude (decimal degrees)
lonEnd longitude (decimal degrees)
AzAzimuth 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
  1. Az=(deg⁡(atan2⁡(sin⁡(rad⁡(−0.1278−−74.006))×cos⁡(rad⁡(51.5074)),cos⁡(rad⁡(40.7128))×sin⁡(rad⁡(51.5074))−sin⁡(rad⁡(40.7128))×cos⁡(rad⁡(51.5074))×cos⁡(rad⁡(−0.1278−−74.006))))+360)mod360=51.2126

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.

Questions answered

Related calculators