Math · FREE ONLINE TOOL

Distance Calculator

Calculate coordinate distance or spherical great-circle distance from decimal or degree-minute-second latitude and longitude.

Your inputs

Calculations run in your browser. No account needed.

EXAMPLE RESULTCalculated locally
Distance
5
Clear inputs. Transparent methods.
My workspace

Calculate with your inputs to save a result or compare scenarios.

How it works

A useful distinction

Longitude wraps around the date line

Locations at 179° east and 179° west are only 2° apart in longitude across the date line. Enter hemisphere signs correctly; treating them as 358° apart gives the wrong intuition about their shortest surface separation.

Choosing planar or geographic distance

Coordinate distance treats points in the selected mathematical space, while great-circle distance models locations on a curved Earth. Use latitude and longitude fields only with the geographic mode, and check signs and angle units. A geographic straight-line estimate is different from a road route. For travel mileage along roads, use the separate driving-route calculator and review its provider result.

Coordinate distance: formula and assumptions

d = √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²].

Coordinates must use the same linear unit. This is straight-line distance, not road distance.

Great-circle distance: formula and assumptions

h=sin²(Δφ/2)+cosφ₁ cosφ₂ sin²(Δλ/2); distance=2R atan2(√h,√(1−h)).

A spherical great-circle estimate is not a road route or a survey-grade ellipsoidal distance.

Latitude & longitude in DMS: formula and assumptions

Decimal angle=hemisphere sign×(degrees+minutes/60+seconds/3600), then apply the spherical great-circle formula.

Use nonnegative degree magnitudes with N/S for latitude and E/W for longitude. This is a spherical straight-line surface distance, not a road route.

Worked example

Using the Coordinate distance example:

Inputs
x₁
0
y₁
0
z₁ (0 for 2D)
0
x₂
3
y₂
4
z₂ (0 for 2D)
0
Method

d = √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²].

Result

Example result

Distance: 5

These are illustrative inputs. Change the values to explore a different scenario.

Formula references

References explain the underlying methods; they do not imply endorsement or individual professional review of Finflo.

Common questions

Is great-circle distance the same as driving distance?

No. It estimates the shortest surface arc on a spherical Earth, without roads, terrain or route restrictions.

How do I enter southern or western DMS coordinates?

Use a nonnegative degree magnitude and select S or W. The hemisphere supplies the sign.

Prepared by Finflo. See our methodology and editorial policy.