Azimuth Calculator - Bearing, Quadrant, and Great-Circle Distance

Use this azimuth calculator to compute the initial bearing, compass quadrant, and great-circle distance between any two latitude/longitude pairs.

Updated: June 19, 2026 • Free Tool

Azimuth Calculator

Signed decimal degrees of the starting point. Positive for the Northern Hemisphere, negative for the Southern.

Signed decimal degrees of the starting point. Positive east of the prime meridian, negative west.

Signed decimal degrees of the destination point. Positive north of the equator, negative south.

Signed decimal degrees of the destination point. Positive east of the prime meridian, negative west.

Results

Initial Azimuth
0°
Compass Quadrant 0
Great-Circle Distance 0km

What Is Azimuth Calculator?

An azimuth calculator returns the initial bearing between any two points on Earth when you give it the latitude and longitude of each point, along with the great-circle distance and a compass quadrant label.

  • Satellite dish alignment: Point a dish at a target geostationary satellite and read the bearing in degrees clockwise from true north.
  • Solar panel orientation planning: Check the roof azimuth relative to true south and pick the equator-facing slope that maximizes annual generation.
  • Hiking and land navigation: Turn two map coordinates into a single compass bearing for a handheld compass when the trail fades.
  • Drone and aircraft course planning: Set the initial heading for a UAV or light-aircraft leg between two waypoints, then compare the bearing to the actual track to spot wind drift.

Azimuth has been the standard horizontal direction in navigation for centuries. The U.S. Army Field Manual 21-26 defines azimuth as a horizontal angle measured clockwise from a north base line, with east at 90 degrees, south at 180 degrees, and west at 270 degrees.

This page computes the initial bearing and great-circle distance in one pass. A London-to-Rio leg comes out close to 9,300 km even though the straight line on a flat map looks longer.

When you want the point that lies in the exact opposite direction from the starting coordinate, the Antipode Calculator returns the diametrically opposite latitude and longitude in the same signed-decimal format.

How Azimuth Calculator Works

The azimuth calculator converts each latitude and longitude from signed decimal degrees to radians, then plugs them into the standard initial-bearing equation and the haversine distance equation. Both come from spherical trigonometry and assume Earth is a sphere with the mean radius used by NASA.

theta = atan2(sin(Delta_lambda) * cos(phi_2), cos(phi_1) * sin(phi_2) - sin(phi_1) * cos(phi_2) * cos(Delta_lambda))
  • phi_1, phi_2: Latitude of the starting and destination points, in radians.
  • Delta_lambda: Longitude difference between destination and starting points, in radians.
  • atan2(y, x): Two-argument arctangent that returns the angle in the correct quadrant from the east-west numerator and north-south denominator.
  • R = 6371.0088 km: Earth's mean radius, the multiplier that turns the central angle from radians into kilometers.

atan2 is used instead of plain atan because atan only returns a value between -90 and +90 degrees, which collapses the compass onto a single line. atan2 takes the east-west and north-south components separately and returns the angle in the correct quadrant.

The haversine formula runs on the same coordinates to get the distance, using the half-angle sine identity to avoid the cancellation error you get from the spherical law of cosines when two points are close together.

London to Rio de Janeiro

Starting point: 51.5074 N, -0.1278 W (London). Destination: -22.9068 S, -43.1729 W (Rio de Janeiro).

phi_1 = 0.9009 rad, phi_2 = -0.3997 rad, Delta_lambda = -0.7519 rad.

Initial azimuth = 219.26 degrees (SSW). Great-circle distance = 9,277.4 km.

A compass pointed 219 degrees clockwise from true north points straight toward Rio from central London.

According to Wikipedia (Azimuth), azimuth is the horizontal angle measured clockwise from a north base line in a local spherical coordinate system, with east at 90 degrees, south at 180 degrees, and west at 270 degrees.

If you only need the distance along the great-circle arc and not the bearing, Great Circle Calculator solves the haversine half of this calculation in a single keystroke.

Key Concepts Explained

Four ideas make the formula's output interpretable: what an azimuth is, how atan2 fixes the quadrant, why Earth is treated as a sphere, and how compass quadrants map to the numeric bearing.

Initial vs final bearing

The initial bearing is the heading you set at the start of the leg. A great-circle route curves toward the destination, so the heading along the path (the final bearing) is different. The page returns the initial bearing, which is what you use to point a dish or set a compass.

Why atan2 instead of atan

The single-argument atan function only returns angles in two quadrants. The east-west and north-south components of the direction vector define a point on the plane, and atan2 returns the angle in whichever of the four quadrants the point actually occupies.

Earth as a sphere

The page uses Earth's mean radius of 6371.0088 km. Real Earth is slightly oblate, so the true distance varies by less than 0.5 percent with latitude, well below the precision of a handheld compass.

Compass quadrants

A 360-degree bearing is split into eight 45-degree arcs that match a compass rose: N at 0, NE at 45, E at 90, SE at 135, S at 180, SW at 225, W at 270, NW at 315. The page rounds the bearing to the nearest quadrant.

Once you know the azimuth comes from atan2, the same number describes the compass heading for a telescope, dish, rifle scope, or theodolite without any further conversion.

If the two points are exact antipodes, the initial bearing is mathematically undefined, so the page returns about 20,015 km and a bearing of 0.00 degrees to keep the result table readable.

The same idea of measuring horizontal angle from a reference axis shows up in physics, and Spherical Coordinates Calculator walks through the related conversion for spherical coordinates in three dimensions.

How to Use This Calculator

Five short steps take you from two coordinates on a map to the initial bearing, compass quadrant, and great-circle distance.

  1. 1 Look up the starting coordinates: Copy the starting latitude and longitude from a map app. The defaults are central London.
  2. 2 Look up the destination coordinates: Copy the destination latitude and longitude in the same signed decimal-degree format. The default is central Rio de Janeiro.
  3. 3 Enter the starting latitude and longitude: Type the starting latitude in the first row and the longitude next to it. Use the sign convention of the source: positive north and east, negative south and west.
  4. 4 Enter the destination latitude and longitude: Type the destination latitude and longitude in the second row. The page validates each value and stops with a clear error if a value is out of bounds.
  5. 5 Read the azimuth, quadrant, and distance: The initial bearing is shown in degrees clockwise from true north, the 8-point compass quadrant is shown next to it, and the great-circle distance in kilometers is shown below. The numbers refresh as you type.

Try 40.7128 N, -74.0060 W as the starting point and 35.6762 N, 139.6503 E as the destination. The page returns an initial bearing of about 332.99 degrees (NNW) and a distance of about 10,851.7 km, the rough course for a transpacific flight from New York to Tokyo.

Once you have the bearing, you can convert the same coordinates into UTM eastings and northings with Lat Long to UTM Calculator so the route lines up with a local-grid map.

Benefits of Using This Calculator

These benefits show up whenever you need a single bearing and distance from a pair of coordinates, without firing up a desktop GIS package.

  • Skip the manual atan2 math: Computing the bearing by hand requires converting degrees to radians and unwrapping atan2. The page returns a single signed degree value.
  • Get bearing and distance in one step: Most online calculators only give one or the other. The page returns the initial bearing, the 8-point compass quadrant, and the great-circle distance in the same pass.
  • Validate the coordinate range automatically: Latitudes outside -90 to +90 and longitudes outside -180 to +180 are flagged before the formula runs, catching off-by-sign and off-by-decimal mistakes when coordinates are copied between map tools.
  • Work in the signed decimal format your map uses: Inputs and outputs use the signed-decimal convention used by Google Maps, GIS layers, and most GPS units, so the result can be pasted into the next tool in your workflow.
  • Handle the same-point and antipode edge cases cleanly: Identical coordinates return 0 degrees and 0 km instead of NaN, and antipodal coordinates return a half-circumference distance with a 0-degree bearing instead of dividing by zero.

For long routes the result is the initial heading at the start of the leg, not the heading you would hold at the midpoint or end. For short visible-landmark routes the drift is small enough that the initial bearing is good enough to set a compass and walk.

For a different kind of trajectory calculation that uses arcsine and arccosine on a measured ellipse, Angle Of Impact Calculator works out the angle at which a droplet struck a surface.

Factors That Affect Your Results

The formula is fixed, but the assumptions underneath the inputs and the shape of the route change how the result should be read.

Sphere vs ellipsoid Earth model

The page uses a sphere with R = 6371.0088 km. Real Earth is slightly oblate, so the true distance varies by up to 0.5 percent with latitude. For satellite dish alignment and casual navigation the sphere model is more than accurate enough.

Hemisphere sign convention

Mixing 0 to 360 east longitudes with signed +/- 180 longitudes is the most common mistake when copying coordinates. The page uses the +/- 180 convention because that is what the haversine formula expects.

Initial vs final bearing

The bearing on a great-circle route changes along the path because the route curves toward the destination. The page returns the initial bearing at the starting point, which is the standard answer for satellite dish alignment and the heading to set at the start of a leg.

Antipodal points

When the two points sit on opposite sides of the Earth, the initial bearing is mathematically undefined because every direction is equally short. The page returns a distance of pi * R km (about 20,015 km) and a bearing of 0.00 degrees so the result table stays readable.

Magnetic declination

The bearing is measured from true north. A handheld magnetic compass points to magnetic north, which is offset by the local declination. To aim a magnetic compass you must add or subtract the local declination from the bearing the page returns.

  • The haversine formula assumes Earth is a perfect sphere. For geodetic-grade work, switch to Vincenty's formulae or a WGS84 ellipsoid library.
  • The page returns the initial heading. The actual heading along a great-circle route changes continuously, so pilots update the heading at every waypoint on intercontinental flights.

Magnetic declination is the most common reason a hand-held compass does not match the page's bearing; declination varies from about +20 degrees in eastern North America to about -10 degrees in Australia and drifts over decades, so add or subtract the local declination from the true-north bearing before you set a magnetic compass.

According to Omni Calculator, the initial azimuth from latitude and longitude is theta = atan2(sin(Delta_lambda) * cos(phi_2), cos(phi_1) * sin(phi_2) - sin(phi_1) * cos(phi_2) * cos(Delta_lambda)), and the great-circle distance uses the haversine formula with R = 6371 km.

If the bearing is the first step in choosing a solar orientation, Solar Panel Calculator takes the same roof azimuth and combines it with tilt and peak sun hours to size a working array.

Azimuth calculator showing two latitude/longitude inputs and the resulting initial bearing, compass quadrant, and great-circle distance in kilometers.
Azimuth calculator showing two latitude/longitude inputs and the resulting initial bearing, compass quadrant, and great-circle distance in kilometers.

Frequently Asked Questions

Q: What is azimuth and how is it measured?

A: Azimuth is the horizontal angle measured clockwise from true north to a target direction. East is 90 degrees, south is 180 degrees, and west is 270 degrees, with the full circle returning to 0 at north. The page uses this convention so the answer can be read directly on any compass rose.

Q: How do you calculate the azimuth from latitude and longitude?

A: Convert both latitudes and longitudes from decimal degrees to radians, then compute theta = atan2(sin(Delta_lambda) * cos(phi_2), cos(phi_1) * sin(phi_2) - sin(phi_1) * cos(phi_2) * cos(Delta_lambda)) and convert the radians back to degrees. The page does the conversion, the atan2 call, and the normalization into the 0 to 360 range for you.

Q: What is the azimuth from London to Rio de Janeiro?

A: From central London (51.5074 N, 0.1278 W) to central Rio de Janeiro (22.9068 S, 43.1729 W) the initial azimuth is about 219.26 degrees, which is just west of south-southwest. The great-circle distance between the same two points is about 9,277 kilometers.

Q: Why does the azimuth formula use atan2 instead of atan?

A: The single-argument atan function only returns angles between -90 and +90 degrees, which collapses the result onto a single line. atan2 takes the east-west numerator and the north-south denominator separately and returns the angle in whichever of the four quadrants the direction vector actually occupies, which is the behaviour you need for a 360-degree compass.

Q: What is the difference between azimuth and bearing?

A: Azimuth is always measured clockwise from true north in the 0 to 360 range. Bearing is a broader term that can be measured from true north, true south, magnetic north, or magnetic south, and can run clockwise or counter-clockwise. The page returns azimuth, which is the standard convention for satellite dish alignment, surveying, and astronomy.

Q: How accurate is the azimuth calculator for long distances?

A: For most navigation uses the haversine-on-a-sphere model is accurate to within about 0.5 percent of the true geodesic distance. For sub-meter surveying or long-range ballistic work, switch to Vincenty's formulae or a WGS84 ellipsoid library because the sphere approximation drifts by a few hundredths of a degree on transcontinental routes.