Azimuth Calculator
Calculate the azimuth and great-circle distance between two coordinates, or the altitude and azimuth of a celestial object. Includes the 16-point compass direction, back azimuth, and distance in km, miles, or nautical miles.
https://hexacalculator.com/calculators/physics/astrophysics/azimuth-calculator
Physics
Astrophysics
Azimuth Calculator
Calculate the azimuth and great-circle distance between two coordinates, or the altitude and azimuth of a celestial object. Includes the 16-point compass direction, back azimuth, and distance in km, miles, or nautical miles.
Azimuth Calculator
Azimuth calculator
deg
deg
deg
deg
Enter the latitude and longitude of both points to get the azimuth (compass bearing) and the great-circle distance between them.
Azimuth is measured clockwise from true north: north is 0 degrees, east 90, south 180, and west 270.
Azimuth is the direction on a compass that points to a particular destination and is measured as an angle starting from true north in a clockwise direction. North corresponds to 0 degrees, east to 90, south to 180 and west to 270. This answers the simple question: "What direction do I need to look?"
This calculator can be used in two ways. If you enter two points on the Earth it will return the azimuth and shortest distance between those points. If you enter the declination and hour angle of a celestial body at a particular location it will return the altitude of that celestial body and the direction to look for it.
What is an azimuth?
According to the U.S. military definition, azimuth is the angle between two lines originating from your location. One line points north and the other line points toward a distant target. The angle is always measured clockwise. An object that is due east has an azimuth of 90 degrees while one that is due west has an azimuth of 270 degrees.
Azimuth is also used to determine direction on the sky. In this case it is combined with the elevation angle. The elevation angle is the angle above the horizon from 0 at the horizon up to 90 directly overhead (zenith). By combining azimuth and elevation one can pinpoint exactly where to look in the sky.
Azimuth and distance between two points.
To determine the position of one point relative to another requires two values: azimuth and distance. On a flat map, distance is a straight line. However, since the Earth is nearly spherical, the actual shortest path is along a great circle, or what a bird would follow if it flew directly.
The distance is calculated using the haversine formula.
The azimuth, or initial direction set at the calculation, can be derived from those same coordinates.
Here phi is the latitude and lambda is the longitude, both expressed in decimal degrees. Latitude is positive north of the equator and negative south of it. Longitude is positive east of Greenwich and negative west of it. Delta represents the difference, that is, the value obtained by subtracting the coordinates of the starting point from those of the end point. R stands for the average radius of the Earth, which is 6371 km. Since the initial azimuth can be negative, 360 degrees are added to bring it in the range 0 to 360.
Example (from London to Rio de Janeiro):
London is the starting point with a latitude of 51.50 and longitude of 0. The end point is Rio de Janeiro with a latitude of -22.97 and longitude of -43.18. The two values for Rio de Janeiro are negative because it is south of the equator and west of Greenwich.
The change in latitude is -74.47 degrees and the change in longitude is -43.18 degrees. Plugging these values into the Haversine formula gives intermediate results of about 0.443 and a distance of approximately 9289 km.
The formula for the azimuth gives a value of about -2.455 radians, which is equivalent to -140.65 degrees. If you add 360 to it, you get 219.35 degrees. Since this direction points southwest, a flight from London to Rio de Janeiro on the shortest path would essentially be in a southwest direction.
16-way compass
The values given are correct, but navigation often uses terms. This calculator converts the azimuth to the nearest traditional 16-point compass direction. Each point covers a sector of 22.5 degrees.
Direction | Azimuth | Direction | Azimuth |
|---|---|---|---|
N | 0 deg | S | 180 deg |
NNE | 22.5 deg | SSW | 202.5 deg |
NE | 45 deg | SW | 225 deg |
ENE | 67.5 deg | WSW | 247.5 deg |
E | 90 deg | W | 270 deg |
ESE | 112.5 deg | WNW | 292.5 deg |
SE | 135 deg | NW | 315 deg |
SSE | 157.5 deg | NNW | 337.5 deg |
Opposite and end azimuths
The back azimuth is the opposite direction of an azimuth, or the angle you see when you turn around and look in the original direction. It's calculated by either adding or subtracting 180 from the azimuth. Surveyors often use it to verify a line of sight.
On long curved flight routes the heading changes imperceptibly during the course of the journey as you are constantly following a curve. The final heading, therefore, which is the actual direction when you arrive, will be different from your initial heading. For example, a route from London to Rio de Janeiro shows an initial heading of about 219 degrees but the actual orientation on arrival is very different.
Azimuth in astronomy:
This calculator allows you to convert celestial objects into actual elevation angles and azimuths. You need to input the latitude of your location, declination of the object, and hour angle.
Declination is the celestial latitude and measures the angle by which a celestial body is north or south of the celestial equator. The hour angle indicates how far a celestial body has moved since crossing your meridian, and is measured at an angular rate of 15 degrees per hour. For observers in the Northern Hemisphere, the celestial body will be exactly due south and highest in the sky when its hour angle is zero. This time is known as culmination.
A positive altitude means the object is above the horizon and possibly visible. A negative altitude means that the object has already set below the horizon. The zenith distance is the value obtained by subtracting the altitude from 90 degrees, and indicates how far away the object is from being directly overhead (the zenith).
Satellite antenna installation
Satellite dishes are aligned using azimuth and elevation angles. The azimuth determines the rotation of the dish around a vertical axis to set the correct compass direction. Again North is used as reference with North being 0, East 90, South 180 and West 270. So if the azimuth was 120 degrees then the dish would be pointing towards the south-east, slightly east of due south.
Used symbols:
Symbol | Meaning | Example |
|---|---|---|
phi | Latitude, or the observer's latitude | 51.50 deg |
lambda | Longitude | -43.18 deg |
theta / A | Azimuth, clockwise from north | 219.35 deg |
d | Great-circle distance | 9289 km |
delta | Declination of a sky object | 23.44 deg |
H | Hour angle | 30 deg |
R | Earth's mean radius | 6371 km |
The results for the great circles are based on the assumption that the Earth is a sphere, and therefore deviate slightly from actual geodetic values on the ellipsoid. The celestial calculations use geometric methods without taking into account atmospheric effects. Due to atmospheric refraction objects appear about half a degree higher at the horizon.
Frequently asked questions
- How to calculate azimuth from latitude and longitude?
Given two points (phi1, lambda1) and (phi2, lambda2), x is computed as sin(delta-lambda) multiplied by cos(phi2), where delta-lambda is the difference in longitude. y is computed as cos(phi1) sin(phi2) minus sin(phi1) cos(phi2) cos(delta-lambda). The azimuth is atan2(x, y). This is converted to degrees and brought into the range 0-360 by adding 360 if it is negative.
- What do the numerical values mean for the azimuth?
Azimuth is a compass direction measured clockwise from true north. North is 0 degrees, east is 90, south is 180 and west is 270. So an azimuth of 45 degrees would be northeast and an azimuth of 225 degrees would be southwest.
- What is the difference between azimuth and elevation?
Azimuth is a horizontal direction that indicates the direction along the horizon to move in. Elevation angle is a vertical angle above the horizon, measured from 0 degrees at the horizon up to 90 degrees directly overhead. In astronomy, both values are combined to pinpoint the exact position of a celestial object in the sky.
- How to adjust the azimuth of a satellite dish?
Azimuth is the angle by which the antenna is rotated about a vertical axis, measured in degrees relative to north. North corresponds to 0, east to 90, south to 180 and west to 270. If the required azimuth is 120 degrees then the antenna should be pointed towards the southeast, slightly east of due south, and then the elevation angle will be fine-tuned.
- Is it a straight line or curve?
This is the great-circle distance, which is the shortest path along the Earth's curved surface. It usually corresponds to what a bird would fly if it went in a straight line. This calculator outputs the result by default in kilometers but can be converted to miles, nautical miles or meters.
- What is an inverse direction?
The opposite direction is the direction that is exactly opposite to a given direction, i.e., the angle you would get if you turned around and looked in the direction of your starting point. To find the opposite direction, add 180 degrees to the given direction. If this results in an angle greater than 360 degrees, subtract 180 from it.
Related calculators






Disclaimer: This calculator is provided for general informational and educational purposes only. Our calculators are under active development, and results may be inaccurate, incomplete, or unsuitable for your situation. Always verify the figures independently and seek advice from a qualified professional before relying on them. We make no warranties and accept no liability for any loss or decision arising from use of this tool.
References
- US Naval Observatory: Altitude and Azimuth of the Sun or Moon
The official reference for horizontal (altitude-azimuth) coordinates of celestial objects.
- Ed Williams: Aviation Formulary
Standard great-circle course (azimuth) and distance formulas used in navigation.
- Wikipedia: Azimuth
Definition of azimuth in navigation and astronomy, and the horizontal coordinate system.
- Wikipedia: Haversine formula
Derivation of the great-circle distance formula between two latitude-longitude points.