How do you calculate distance between two coordinates by hand?

Updated · 3 min read

Latitude and longitude are angles, so subtracting them does not directly produce miles. The distance calculator uses spherical geometry to turn two coordinate pairs into a great-circle distance, a useful baseline for understanding how far apart places are.

You can reproduce the coordinate distance calculator result with a scientific calculator and careful bookkeeping. Here, by hand means working through the formula yourself, including trigonometric functions. We will use stated representative city coordinates rather than imply there is a unique point that represents every part of a city.

Try the Distance Calculator

Enter your own numbers. Nothing you type leaves your device.

Open the full Distance Calculator

Write the points and the spherical assumption

Use New York City at latitude 40.7128 and longitude -74.0060, and Los Angeles at latitude 34.0522 and longitude -118.2437, in decimal degrees. These are the example points for this calculation. Negative longitude means west; reversing latitude and longitude would describe a different location.

The site uses R = 6371.0088 km for the Earth's radius. NOAA's great-circle routine likewise documents a spherical-Earth model, although its historical radius constant differs slightly. Earth is not a perfect sphere, so this calculation is an approximation, not a replacement for precise ellipsoidal geodesy or a survey.

Convert degrees to radians before using sine

Multiply a degree angle by pi / 180 to get radians. Let phi represent latitude and lambda represent longitude. The starting latitude phi1 is approximately 0.71057241 radians, and phi2 is approximately 0.59432301 radians. Retain more digits in your calculator than you write on paper.

The latitude difference is -6.6606 degrees, or approximately -0.11624940 radians. The longitude difference is -44.2377 degrees, or approximately -0.77209352 radians. Put your scientific calculator in radian mode before entering these converted numbers. Using degree mode with radian inputs is a common source of incorrect answers.

Apply the haversine formula step by step

Calculate a = sin(delta phi / 2)^2 + cos(phi1) times cos(phi2) times sin(delta lambda / 2)^2. For the stated city points, a is approximately 0.0924109108. The squared sine terms keep the distance calculation independent of the signs of the coordinate differences.

Next calculate c = 2 times arcsin(sqrt(a)). Here c is approximately 0.6177595754 radians. Finally, distance = R times c = 6371.0088 times 0.6177595754, which gives approximately 3935.7517 km. Divide the kilometer result by 1.609344 to obtain approximately 2445.5627 miles.

Same point pair expressed in different units
OutputRounded resultConversion basis
Kilometers3935.75R times central angle
Statute miles2445.56Kilometers / 1.609344
Nautical miles2125.14Kilometers / 1.852

Use simple variations as error checks

A good formula should behave sensibly for easy cases before you trust a long calculation. Identical coordinates produce zero distance. A one-degree longitude separation on the equator is about 111.20 km with the site's radius; two degrees there are about 222.39 km.

These equatorial checks work because the central angle is directly the longitude separation. Do not extend that shortcut unchanged to higher latitudes: lines of longitude converge toward the poles. The haversine formula handles that effect through its cosine factors.

Coordinate variations on the equator
First pointSecond pointDistance, km
0, 00, 00.00
0, 00, 1111.20
0, 00, 2222.39

Interpret the answer without promising a route

The great-circle result follows the shorter arc over a spherical surface. It is not a straight tunnel through the Earth, a road itinerary, or a guarantee about an airline's route. Real travel has constraints such as roads, airspace, connections, weather, and the exact departure and arrival points.

For practical work, keep the input coordinates attached to the result and state your rounding. Reporting 3935.75 km is useful for reproducing this example, but the extra decimals do not make the spherical model survey-grade. If legal boundaries, engineering tolerances, or high-precision navigation matter, use an appropriate geodesic method and coordinate reference system.

Frequently asked questions

Not directly in degrees for a long Earth-surface distance. Latitude and longitude are angular coordinates, and longitude spacing changes with latitude.

Sources