Travel and transport

Great-circle distance calculator

Spherical Earth with mean radius 6,371 km. This is not road distance or a navigation solution.

Your numbers

Use the units shown. Results update as you change valid inputs.

YOUR RESULT

Spherical Earth with mean radius 6,371 km. This is not road distance or a navigation solution.

THE NUMBERS, EXPLAINED

How to use this calculator.

Spherical Earth with mean radius 6,371 km. This is not road distance or a navigation solution.

Start with your inputs

Enter latitude a (degrees), longitude a (degrees), latitude b (degrees), longitude b (degrees). Keep amounts in the units shown on each field. The example is a starting point, not a recommended value.

InputExample value
Latitude A (degrees)0
Longitude A (degrees)0
Latitude B (degrees)0
Longitude B (degrees)90

A worked example

With the example inputs above, great-circle distance (km) is 10,007.543398. Change the inputs to explore your own scenario.

All results for the example inputs above
ResultExample answer
Great-circle distance (km)10,007.543398

How this is calculated

Great-circle distance (km)

greatCircleDistance(a,b,c,d)

Symbols and units
a
Latitude A (degrees)
b
Longitude A (degrees)
c
Latitude B (degrees)
d
Longitude B (degrees)

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Calculation steps and notation

Convert latitude and longitude to radians. Let h = sin²(Δlatitude/2) + cos(latitude₁) × cos(latitude₂) × sin²(Δlongitude/2). Distance = 2 × 6371 × asin(sqrt(h)) km, clamping h to [0,1] for rounding. This assumes a spherical Earth.

Assumptions and limits

Spherical Earth with mean radius 6,371 km. This is not road distance or a navigation solution.

Calculations use the values you enter. Blank or invalid inputs show an error instead of silently substituting zero. Results are displayed to useful precision; calculations retain the underlying numeric precision.

Questions about this tool

What does the result tell me?

Great-circle distance (km). The result applies to the method and inputs described above. Check the units and assumptions before using it in a decision.

Why might another calculator differ?

Differences in units, rounding, timing or model definitions can produce different answers. Compare the input definitions and the method, rather than only the final number. For this tool: Spherical Earth with mean radius 6,371 km. This is not road distance or a navigation solution.

Are my inputs stored or sent to AI?

Calculations on this page happen in your browser. The separate AI question finder sends its submitted conversation to OpenAI; these calculator fields are not sent. Favourites and recent tool names are stored locally. A shared link contains the inputs you choose to include.

Review status

Software example and browser checks are recorded in our quality report. No external expert review is claimed. Created with coding assistance; calculations run as ordinary browser code.

Read the quality report →