Enter the coordinates of the first and second port into the calculator to determine the distance.
Port Distance Formula
The following formula (the haversine / great-circle formula) is commonly used to calculate the shortest distance over the Earthโs surface between two ports given their latitude and longitude.
D = 2R \arcsin\left(\sqrt{\sin^2\left(\frac{\varphi_2-\varphi_1}{2}\right)+\cos(\varphi_1)\cos(\varphi_2)\sin^2\left(\frac{\lambda_2-\lambda_1}{2}\right)}\right)Variables:
- D is the great-circle distance between the two ports (in the same units as R; commonly nautical miles)
- R is the Earthโs radius (approximately 3440.065 nautical miles, 6371.0088 km, or 3958.7613 miles)
- ฯ1 and ฯ2 are the latitudes of the first and second port (in radians)
- ฮป1 and ฮป2 are the longitudes of the first and second port (in radians)
To calculate the distance between two ports, convert latitude/longitude from degrees to radians, compute ฮฯ = ฯ2 โ ฯ1 and ฮฮป = ฮป2 โ ฮป1, evaluate the haversine expression above, and multiply the resulting central angle by R. This gives the great-circle distance (the shortest path on a spherical Earth). Actual sailing routes may be longer due to routing, weather, traffic separation schemes, and other constraints.
What is a Port Distance?
A Port Distance refers to the measurement of the distance between two seaports. This measurement is typically used in the shipping and logistics industry to calculate the time and cost of transporting goods from one port to another. The distance is usually measured in nautical miles and can be influenced by factors such as the route chosen, weather conditions, and maritime regulations.
How to Calculate Port Distance?
The following steps outline how to calculate the Port Distance using the haversine (great-circle) formula:
- Gather the latitude and longitude of each port (in degrees).
- Convert each latitude/longitude value from degrees to radians.
- Compute ฮฯ = ฯ2 โ ฯ1 and ฮฮป = ฮป2 โ ฮป1.
- Compute a = sinยฒ(ฮฯ/2) + cos(ฯ1)cos(ฯ2)sinยฒ(ฮฮป/2).
- Compute the central angle c = 2ยทatan2(โa, โ(1 โ a)).
- Multiply to get distance: D = Rยทc, using an Earth radius R in your desired units (e.g., nautical miles).
Example Problem:
Use the following variables as an example problem to test your knowledge:
ฯ1 = 40ยฐ (latitude of the first port)
ฮป1 = โ73ยฐ (longitude of the first port)
ฯ2 = 35ยฐ (latitude of the second port)
ฮป2 = โ80ยฐ (longitude of the second port)
Using R = 3440.065 nautical miles, the great-circle distance is approximately D โ 448.6 nautical miles (โ 830.7 km).
