# Azimuth Calculator

Created by Bogna Szyk
Reviewed by Steven Wooding
Last updated: Jan 03, 2023

This azimuth calculator will let you calculate the azimuth from the latitude and longitude of two points. It will tell you which direction you need to point your compass to and what is the shortest distance between two points of known geographical coordinates. This article includes a short explanation of the formulas we used – they can prove themselves helpful if you plan to find the azimuth by hand.

This is not a spherical coordinates calculator – it deals with geographical coordinates only!

## What is the azimuth?

By the US Army definition, the term azimuth describes the angle created by two lines: one joining your current position and the North Pole, and the one joining your current position and the distant location. Azimuth is always measured clockwise!

For example, a point lying east from you would have an azimuth of 90°, but a point lying west from you – 270°.

The azimuth is used when indicating a position in the sky too: it marks the horizontal direction. The altitude indicates the vertical direction varying from 0 (the horizon) to 90° (the zenith).

The point opposite to the zenith is called the nadir. Your antipode lies at the nadir: calculate it with our antipode calculator!

## Azimuth formula

If you want to give a location of a point relative to your current position, you need to provide two values: the azimuth and the distance. If Earth were flat, the latter would simply be the straight-line distance between two points. As Earth is a sphere (or, more precisely, a geoid), it is the shortest travel distance between the two points ('as-the-crow-flies').

To calculate the distance $d$ between two points, our azimuth calculator uses the Haversine formula:

\footnotesize \begin{align*} a =\ &\sin^2\left(\frac{\Delta\phi}{2}\right)\ +\\ &\cos \phi_1 \cos\phi_2 \sin^2\left(\frac{\Delta\lambda}{2}\right) \end{align*}
\footnotesize \begin{align*} d &= 2R\ \text{arctan}2(\sqrt{a}, \sqrt{1-a}) \end{align*}

where:

• $\phi_1$ – Latitude of the initial point (positive for N and negative for S);
• $\phi_2$ – Latitude of the final point (positive for N and negative for S);
• $\lambda_1$ – Longitude of the initial point (positive for E and negative for W);
• $\lambda_2$ – Longitude of the final point (positive for E and negative for W);
• $\Delta\phi = \phi_2 - \phi_1$;
• $\Delta\lambda = \lambda_2 - \lambda_1$;
• $a$ – An intermediate step; and
• $R$ – Radius of the Earth, expressed in meters ($R = 6371\ \text{km}$).

Input latitudes and longitudes in the decimal degrees notation. If you're looking to convert degrees minutes seconds to decimal degrees, use degrees minutes seconds calculator.

You can find the azimuth $\theta$ using the same latitudes and longitudes with the following equation:

\footnotesize \! \begin{align*} \theta =\ &\text{arctan2}(\sin\Delta\lambda\cos\phi_2,\\ &\!\!\cos\phi_1\sin\phi_2 - \sin\phi_1\cos\phi_2\cos\Delta\lambda) \end{align*}

## How to calculate the azimuth: an example

Let's assume we want to calculate the azimuth and distance required to determine the position of Rio de Janeiro respective to London. All we have to do is follow these steps:

1. Determine the longitude and latitude of London – our initial point. We can find that $\phi_1 = 51.50\degree$ (positive because it lies in the northern hemisphere) and $\lambda_1 = 0\degree$.

2. Determine the longitude and latitude of Rio de Janeiro – our final point. We can find that $\phi_2 = -22.97\degree$ (negative, because it lies in the southern hemisphere) and $\lambda_2 = -43.18\degree$ (also negative, because it lies in the western hemisphere).

3. Calculate the change in latitude:

\footnotesize \qquad \begin{align*} \Delta\phi &= \phi_2 - \phi_1\\ &= -22.97\degree - 51.50\degree\\ &= -74.47\degree \end{align*}
1. Calculate the change in longitude:
\footnotesize \qquad \begin{align*} \Delta\lambda &= \lambda_2 - \lambda_1\\ &= -43.18\degree - 0\degree\\ &= -43.18\degree \end{align*}
1. Insert all of the data into the Haversine formula to calculate the distance:
\footnotesize \quad\enspace \begin{align*} a =\ &\sin^2\left(\frac{\Delta\phi}{2}\right)\ +\\ &\cos \phi_1 \cos\phi_2 \sin^2\left(\frac{\Delta\lambda}{2}\right)\\[1em] =\ &\sin^2\left(\frac{-74.47\degree}{2}\right) +\\[.7em] &\cos (51.50\degree)\cos(-22.97\degree)\\[.7em] &\sin^2\left(\frac{-43.18\degree}{2}\right)\\[1em] =\ &\ 0.443\\\\ d =\ &\ 2R\ \text{arctan2}(\sqrt{a}, \sqrt{1 - a})\\ =\ &\ 2\times 6371 \times\\ &\ \text{arctan2}(\sqrt{0.443}, \sqrt{1 - 0.443})\\ =\ &\ 9289\ \text{km} \end{align*}
1. Calculate the azimuth from the azimuth equation:
\footnotesize \quad\enspace \begin{align*} \theta =\ &\text{arctan2}(\sin\Delta\lambda\cos\phi_2,\\ &\cos\phi_1\sin\phi2\ -\\ &\sin\phi_1\cos\phi_2\cos\Delta\lambda)\\\\ =\ &\text{arctan2}(\sin(-43.18\degree)\\ &\cos(-22.97\degree),\\ &\cos(51.50\degree)\sin(-22.97\degree)\ -\\ &\sin(51.50\degree)\cos(-22.97\degree)\\ &\cos(-43.18\degree))\\\\ = & -\!2.455\ \text{rad} \end{align*}
1. Convert the azimuth to a positive degree value:
\footnotesize \quad\enspace \begin{align*} \theta &= -2.455\ \text{rad}\\ &= -140.65\degree\\ &= 219.35\degree \end{align*}
1. Congratulations! You have just calculated azimuth from latitude and longitude.

🔎 If you're looking to calculate the distance between two points on Earth's surface given their latitude/longitude coordinates, go to latitude longitude distance calculator.

## FAQ

### How do I calculate the azimuth from latitude and longitude?

You can calculate the azimuth between the points (ϕ₁, λ₁) and (ϕ₂ λ₂), where ϕ is the latitude and λ longitude, as follows:

1. Compute x = sinΔλ × cosϕ₂, where Δλ = λ₂ - λ₁ is the difference in longitudes.
2. Compute y = cosϕ₁ × sinϕ₂ - sinϕ₁× cosϕ₂ × cosΔλ.
3. Finally, find atan2(x,y), i.e., the angle in the standard plane between the positive x-axis and the segment joining (0,0) and (x,y).

### How do I set the azimuth of my satellite dish?

Azimuth is the angle by which you must rotate the whole antenna around a vertical axis to get the signal. Azimuth is given in degrees from North. This means North is 0 deg, East is 90 deg, South is 180 deg, and West is 270 deg. Hence, if the required azimuth is 120 deg, you must point your dish in a South-Easterly direction and slightly more to the East than to the South.

### How do I determine the azimuth in astronomy?

In astronomy, the azimuth is the angle of the object measured around the horizon. We use it, along with altitude, to describe the position of an object on the celestial sphere. Usually, azimuth is measured from true North increasing eastward. Hence its value is:

• 0° for an object located due North of the observer;
• 90° for an object due East;
• 180° for an object due South; and
• 270° for an object due West.

However, there are exceptions where we measure, e.g., from true South increasing westward!

Bogna Szyk
Starting point
Latitude
deg
Longitude
deg
Final point
Latitude
deg
Longitude
deg
Azimuth
Distance
mi
Azimuth
deg
People also viewed…

### Free fall

Our free fall calculator can find the velocity of a falling object and the height it drops from.

### Pizza tip

The pizza tip calculator will help you work out how much you tip a pizza delivery driver!

### Tip from net price

Use the tip from net price calculator to find out how much you should tip if you don't take taxes into account.

### Titration

Use our titration calculator to determine the molarity of your solution.