Azimuth Calculator
This azimuth calculator works out the direction from one point on Earth to another, measured in degrees clockwise from north. You enter the latitude and longitude of your start point and your target, using negative numbers for south and west, and the calculator returns the azimuth, the great circle distance between the two points, the nearest 16-point compass direction, and the reciprocal bearing for the return trip. The azimuth is the same as a true bearing: north reads as 0 degrees, east as 90, south as 180 and west as 270, so a figure near 180 means you are heading almost due south. Behind the scenes it uses the initial great circle bearing formula with the atan2 function, which places the direction in the correct quadrant and shifts any negative result into the 0 to 360 range automatically, and it measures distance along the great circle using the haversine formula with a mean Earth radius of 6,371 kilometres. This makes it useful for aiming a satellite dish or aerial, planning a sailing or tramping route, pointing solar gear, or checking navigation and surveying work. Keep in mind that the azimuth shown is the direction at the start, since a great circle slowly curves, and a fixed compass heading follows a slightly different rhumb line. Enter your two coordinates below and the results update as you type.
Azimuth is the initial great circle bearing, in degrees clockwise from north. Distance uses the haversine formula with an Earth radius of 6,371 km. South and west are negative. Estimate only.
How it works
The azimuth is the initial bearing along the great circle joining the two points. It is found with atan2 of two terms: sin of the longitude difference times the cosine of the target latitude, and the cosine of the start latitude times the sine of the target latitude, minus the sine of the start latitude times the cosine of the target latitude times the cosine of the longitude difference. The result is converted to degrees and shifted into the 0 to 360 range. The distance uses the haversine formula on the same coordinates with a mean Earth radius of 6,371 kilometres.
Worked example
From Auckland at latitude -36.8485, longitude 174.7633 to Wellington at latitude -41.2865, longitude 174.7762, the two longitudes are almost the same while Wellington sits well to the south. The formula returns an azimuth of about 179.9 degrees, which is virtually due south, the nearest compass point is S, and the great circle distance is about 493.5 kilometres. The reciprocal bearing for the trip back from Wellington to Auckland is about 359.9 degrees, or nearly due north.
Related calculators
- Bearing Calculator: bearing from east and north components.
- Distance Calculator: distance between two points.
- Coordinates Converter: switch between coordinate formats.
- Degrees to Radians Calculator: convert angle units.
- Right Angle Triangle Calculator: solve a right triangle.