geography calculators

Distance Between Coordinates Calculator

Converts two pairs of latitude/longitude coordinates into a real-world distance in kilometers, miles, or nautical miles. Useful for trip planning, GIS analysis, and comparing locations on a map.

About this calculator

This calculator applies the Haversine formula to find the surface distance between two geographic coordinates. The core formula is: a = sin²(Δlat/2) + cos(lat1) · cos(lat2) · sin²(Δlon/2); c = 2 · atan2(√a, √(1−a)); d = R · c, where R is Earth's radius — 6,371 km, 3,959 miles, or 3,440 nautical miles depending on your chosen unit. The atan2 variant (sometimes called the Vincenty-lite form) is numerically more stable than plain arcsin for near-antipodal points. Latitude and longitude must be in decimal degrees; negative values represent south latitudes and west longitudes. The output unit can be switched between metric, imperial, and nautical to suit different use cases.

How to use

Find the distance from Paris (48.8566°N, 2.3522°E) to Berlin (52.5200°N, 13.4050°E) in kilometers. Enter lat1 = 48.8566, lon1 = 2.3522, lat2 = 52.5200, lon2 = 13.4050, and select 'km'. The formula computes Δlat ≈ 3.663° and Δlon ≈ 11.053°, plugs them into the Haversine expression with R = 6,371, and returns approximately 878 km — consistent with the known Paris–Berlin air distance. Switch the unit to miles to get roughly 546 miles.

Frequently asked questions

How do I convert degrees, minutes, seconds (DMS) coordinates to decimal degrees for this calculator?

Decimal degrees = degrees + (minutes / 60) + (seconds / 3600). For example, 48°51′24″N becomes 48 + 51/60 + 24/3600 = 48.8567°. For south latitudes or west longitudes, apply a negative sign: 33°52′S becomes −33.867°. Most mapping apps (Google Maps, GPS devices) can display coordinates in decimal format directly if you right-click a location.

What is the difference between kilometers, miles, and nautical miles in distance calculations?

Kilometers (km) are the SI metric unit used in most countries. Miles (statute miles) are used primarily in the United States and United Kingdom for road and land distances. Nautical miles (nmi) are used in aviation and marine navigation; one nautical mile equals exactly 1,852 meters and corresponds to one arcminute of latitude. The calculator uses R = 6,371 km, 3,959 mi, or 3,440 nmi respectively, so the underlying formula is identical — only the Earth-radius constant changes.

Why does my distance calculation differ from Google Maps driving directions?

This calculator gives the straight-line great-circle distance — the shortest path through the air between two points. Google Maps driving directions account for roads, terrain, and legal routes, which are always longer than the straight-line distance. The difference can be significant in mountainous regions or areas with sparse road networks. Think of the great-circle result as a lower bound; actual travel distance will always be equal to or greater than this value.