These equations can be carried out manually—with some difficulty—but today, there are several easy ways to calculate distances digitally, assuming you have the correct data, to begin with. This includes knowing the start and end point (they can be the cities, streets, or even smaller distances), as well as the geographical coordinates of each point. For example, if you measured the distance between New York and Tokyo, their respective coordinates would be as follows:
- New York (latitude 40.7128°N, longitude 74.0060°W)
- Tokyo (latitude 35.6895°N, longitude 139.6917°E)
Keep in mind that for calculation purposes, southern latitudes can be expressed as negative numbers, as can western longitudes. With these numbers in hand, you can plug them into the haversine formulae,
a = sin²(Δφ/2) + cos φ1 ⋅ cos φ2 ⋅ sin²(Δλ/2)
c = 2 * atan2( √a, √(1−a) )
d = R * c
Where φ represent the latitudes, and λ represent the longitudes.
Alternatively, you can use a latitude and longitude calculator, which uses an algorithm based on the formula to find the distance.
What is the calculation useful for?
In the pre-GPS and computer days, the haversine formula was a vital aspect of finding the most efficient distance between two points. Today, this calculation is still important, and it plays a major role in several industries.
For logistics, where distance and time can be the difference between profits and losses, finding the shortest possible point between two locations can greatly improve travel times and reduce wasted resources. More importantly, it can help calculations that feature several moving parts. For instance, an airline that has to fly between two locations with a layover can find the most efficient path to fly, reducing jet fuel use, time that a single airplane is occupied, and increase the number of flights possible in a day. Even for delivery services, it can assist companies with planning the best possible routes for their teams to travel while reducing overall transit times, improving delivery speeds, and generating revenues.
While pen and paper calculations are time-consuming—and not entirely necessary—understanding how to calculate distances using latitude and longitude can help any company identify better routes to cut down the distances their planes, ships, cars, and teams must travel.
These equations can be carried out manually—with some difficulty—but today, there are several easy ways to calculate distances digitally, assuming you have the correct data, to begin with. This includes knowing the start and end point (they can be the cities, streets, or even smaller distances), as well as the geographical coordinates of each point. For example, if you measured the distance between New York and Tokyo, their respective coordinates would be as follows:
- New York (latitude 40.7128°N, longitude 74.0060°W)
- Tokyo (latitude 35.6895°N, longitude 139.6917°E)
Keep in mind that for calculation purposes, southern latitudes can be expressed as negative numbers, as can western longitudes. With these numbers in hand, you can plug them into the haversine formulae,
a = sin²(Δφ/2) + cos φ1 ⋅ cos φ2 ⋅ sin²(Δλ/2)
c = 2 * atan2( √a, √(1−a) )
d = R * c
Where φ represent the latitudes, and λ represent the longitudes.
Alternatively, you can use a latitude and longitude calculator, which uses an algorithm based on the formula to find the distance.