GEO

GPS Distance Calculator

Enter two coordinates to get the distance between them in kilometres, miles and nautical miles, plus the bearing. From central Jakarta to central Bandung is 116.02 km.

Runs in your browser. Nothing you enter is sent to a server.

Latitude, longitude. Decimal, DMS or a map link.
Latitude, longitude. Decimal, DMS or a map link.
Distance 116.02 km

= 72.09 mi · 62.65 nmi · 116,019 m

N E S W
Initial bearing 132.5° SE Direction to set off in from point A, from true north.
WGS84 ellipsoid (Vincenty)
116.02 km
Sphere (Haversine)
116.24 km
Difference
218 m (0.19%)
Advertisements

How is the distance calculated?

The main result uses Vincenty's formula on the WGS84 ellipsoid, the same model of the Earth that GPS uses. It is accurate to well under a millimetre.

For comparison, the calculator also shows the Haversine distance, which treats the Earth as a perfect sphere with a radius of 6,371 km. It is simpler and faster, and stays within about 0.5% of the ellipsoid distance.

Both give the shortest path over the Earth's surface ("as the crow flies"), not the distance by road.

The Haversine formula

With latitudes φ and longitudes λ in radians, and R = 6,371 km:

a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2)
d = 2R · asin(√a)

Coordinate formats you can paste

FormatExample
Decimal degrees-6.2088, 106.8456
Degrees, minutes, seconds6°12'31.7"S 106°50'44.2"E
Degrees and decimal minutes6°12.528'S 106°50.736'E
Hemisphere letters6.2088 S, 106.8456 E
Google Maps or OpenStreetMap linkThe link of a dropped pin or a place

Example

From central Jakarta (-6.2088, 106.8456) to central Bandung (-6.9175, 107.6191) is 116.02 km on the WGS84 ellipsoid, heading south-east at an initial bearing of 132.5°. The Haversine formula gives 116.24 km, 218 m (0.19%) more.

Questions

How accurate is the distance?

The main result uses Vincenty's formula on the WGS84 ellipsoid, accurate to well under a millimetre for the coordinates you enter. The Haversine result treats the Earth as a sphere and can be up to about 0.5% off.

Is this the distance by road?

No. It is the shortest distance over the Earth's surface, often called the distance as the crow flies. Use the route links under the result for road distances.

Which coordinate formats can I paste?

Decimal degrees (-6.2088, 106.8456), degrees-minutes-seconds (6°12'31.7"S 106°50'44.2"E), degrees and decimal minutes, hemisphere letters (6.2088 S, 106.8456 E), and Google Maps or OpenStreetMap links.

What is the initial bearing?

The compass direction, measured clockwise from true north, in which you set off from point A to follow the shortest path to point B. On long routes the direction changes along the way.

Are my coordinates sent anywhere?

No. The calculation runs in your browser. Only the optional OpenStreetMap and Google Maps links send the coordinates to those sites, and only when you click them.

Support this site

The tools are free and need no account. If one saved you time, a small donation helps keep them running.

Want a tool or feature? Suggest it for free, or donate and write your request in the message. Supporters' requests are looked at first.