CalcDepo

Great-Circle Distance Calculator (Haversine)

Find the shortest distance over the Earth surface between two points given by latitude and longitude.

Inputs

Results

Great-circle distance343.5561km
Great-circle distance213.4758miles

Chart

Not what you need? Search by intent

Describe what you want to find — “distance between two cities” — and jump to the right calculator.

How to use the great-circle distance calculator

Find the shortest distance over the Earth surface between two points given by latitude and longitude. Enter latitude of point 1, longitude of point 1, latitude of point 2, longitude of point 2 in the fields above; the great-circle distance are computed instantly and plotted on the chart so you can see how the answer changes.

Common searches this calculator answers include “distance between two cities”, “haversine formula”, “great circle distance”, “calculate great-circle distance”, “find great-circle distance”.

Formula

Great-circle distance (km) = 2 × 6371 × asin(√(sin((lat2-lat1) / 2)^2+cos(lat1) × cos(lat2) × sin((lon2-lon1) / 2)^2))
Great-circle distance (miles) = [Great-circle distance] × 0.621371

Variables

  • lat1 — Latitude of point 1 (°)
  • lon1 — Longitude of point 1 (°)
  • lat2 — Latitude of point 2 (°)
  • lon2 — Longitude of point 2 (°)

Worked example

With latitude of point 1 = 51.5074 °, longitude of point 1 = -0.1278 °, latitude of point 2 = 48.8566 °, longitude of point 2 = 2.3522 °, the calculator gives great-circle distance ≈ 343.5561 km; great-circle distance ≈ 213.4758 miles.

Frequently asked questions

What is the great-circle distance calculator used for?

Find the shortest distance over the Earth surface between two points given by latitude and longitude. It helps with questions such as “distance between two cities”, “haversine formula”, “great circle distance”.

What is the formula for the great-circle distance calculation?

Great-circle distance (km) = 2 × 6371 × asin(√(sin((lat2-lat1) / 2)^2+cos(lat1) × cos(lat2) × sin((lon2-lon1) / 2)^2)). Great-circle distance (miles) = [Great-circle distance] × 0.621371. Here lat1 is latitude of point 1 (°), lon1 is longitude of point 1 (°), lat2 is latitude of point 2 (°), lon2 is longitude of point 2 (°).

What inputs do I need for the great-circle distance calculator (haversine) calculator?

You need latitude of point 1 in °, longitude of point 1 in °, latitude of point 2 in °, longitude of point 2 in °. Each field is pre-filled with a typical example so you can see how the result responds as you edit the numbers.

How do I use the great-circle distance calculator?

Type values into the input fields. Results and the chart update instantly. Use Reset to restore the example values, Copy results to paste them elsewhere, or Share to copy a link that preserves your inputs.

Is the great-circle distance result exact?

Calculations use standard formulas and double-precision arithmetic, then display about seven significant figures. Real-world measurements carry uncertainty, so treat results as estimates unless your inputs are exact.

Related calculators

More in Geometry & Trigonometry: Circle · Circle Sector and Arc · Triangle Area · Triangle Angles from Sides · Law of Sines · Law of Cosines · Right Triangle · Trigonometric Functions