CalcUnit Logo

Geodesic Calculator

What is the Geodesic Calculator?

What this calculator does

Give it the latitude and longitude of two places, and this page returns the shortest distance between them along Earth's surface, in kilometers and in miles. It also reports the central angle between the points, in both radians and degrees.

A sphere, not the true ellipsoid

Be clear about the model: this page treats Earth as a perfect sphere of radius 6,371 km and runs the haversine formula. Survey-grade tools use the flattened WGS84 ellipsoid and can differ by up to about half a percent. For travel and planning, this page is plenty.

The four inputs it asks for

Latitude 1 and Longitude 1 locate the first point, and Latitude 2 and Longitude 2 locate the second. The page opens with New York City at 40. 7128, -74. 006 and London at 51. 5074, -0. 1278, so a transatlantic example is ready on load.

Reading the four result lines

Two lines are both labeled Central Angle, one in radians to six decimals and one in degrees to four. The other two are both labeled Distance, one ending in km and one in mi. The unit suffix is the only way to tell each pair apart.

Worked example: the page default

New York City to London gives a central angle of 0. 874309 rad, which is 50. 0942 degrees. Multiplied by the radius, the distance is 5570. 22 km, or 3461. 17 mi. That is the great-circle hop airlines approximate when they cross the Atlantic.

Worked example: Paris to Berlin

Enter 48. 8566, 2. 3522 for Paris and 52. 52, 13. 405 for Berlin. The central angle is 0. 137728 rad, or 7. 8912 degrees, and the distance is 877. 46 km, or 545. 23 mi. Short hops like this are where the haversine formula earns its keep.

Worked example: Sydney to Melbourne

Enter -33. 8688, 151. 2093 for Sydney and -37. 8136, 144. 9631 for Melbourne. The negative latitudes mark the Southern Hemisphere. The angle is 0. 111980 rad, or 6. 4160 degrees, and the distance is 713. 43 km, or 443. 30 mi, matching the familiar Australian run.

Worked example: Los Angeles to San Francisco

Enter 34. 0522, -118. 2437 and 37. 7749, -122. 4194. The central angle is 0. 087760 rad, or 5. 0283 degrees, and the distance is 559. 12 km, or 347. 42 mi. The road trip is much longer, because highways cannot follow the surface arc this page measures.

The haversine formula, piece by piece

It forms a = sin^2(delta lat / 2) + cos(lat1) × cos(lat2) × sin^2(delta lon / 2), then takes the angle as 2 × atan2(sqrt(a), sqrt(1 - a)). Multiplying that angle by 6,371 km converts it from a direction into a distance.

Why haversine instead of the plain cosine rule

The spherical law of cosines loses precision on short hops, because the cosine of a tiny angle sits indistinguishably close to 1. Haversine works with sines of half-angles instead, which stay well behaved from a few meters up to halfway around the planet.

Enter coordinates as decimal degrees

The fields want decimal degrees, not degrees, minutes, and seconds. Convert by dividing minutes by 60 and seconds by 3600, then adding: 40 degrees 42 minutes 46 seconds becomes 40. 7128, which is exactly the New York latitude the page opens with.

Signs carry the hemispheres

North latitudes and east longitudes are positive; south and west are negative. New York's longitude is -74. 006 because it lies west of the prime meridian, and Sydney's latitude is negative because it lies south of the equator. A flipped sign mirrors your point across the globe.

One degree along the equator

Set both points on the equator one degree of longitude apart and the page returns 111. 19 km, or 69. 09 mi, with a central angle of exactly 1. 0000 degrees. That figure is a handy scale for judging any coordinate difference you meet.

The same point twice

Enter identical coordinates in both pairs and every distance reads 0, with both angle lines at 0 as well. It sounds trivial, but it is a fast way to confirm you have pasted a coordinate pair into matching fields before trusting a longer calculation.

Halfway around the world

Points on exactly opposite sides of Earth sit a central angle of pi radians apart, and the distance tops out at half the model's circumference: about 20,015. 09 km, or 12,436. 79 mi. No two surface points can be farther apart than antipodes on this model.

No validation guards the fields

Nothing stops you entering a latitude of 100 or a longitude of 250, and the formula will still return a number, because sines and cosines accept any angle. That number is meaningless: real latitudes run from -90 to 90 and longitudes from -180 to 180.

A surface arc, not a route

The distance is the path a taut string would take across a smooth globe. It ignores mountains, oceans, roads, air corridors, and winds. Driving distances run far longer, and even flights bend away from the perfect arc for weather, traffic, and airspace rules.

No bearing, midpoint, or travel time

This page answers one question: how far apart are the two points along the surface. It does not report the compass direction to head, the halfway point, or how long any vehicle would take. Those need their own tools and extra inputs.

Where great-circle distance matters

Airlines plan near-great-circle routes to save fuel, which is why flights from North America to Asia arc over the Arctic. Shipping, long-distance radio, and missile and satellite work all start from the same shortest-surface-path idea this page computes.

A short-hop check

Place both points on the equator a tenth of a degree of longitude apart and the page returns 11. 12 km, or 6. 91 mi. Scaling the one-degree figure of 111. 19 km by a tenth predicts exactly that, which makes it a quick way to test a coordinate pair near home.

Longitude degrees shrink toward the poles

Degrees of longitude converge as latitude climbs: one degree of longitude along the 60th parallel spans only about 55. 60 km of surface, roughly half its equatorial reach. Latitude degrees barely change. That asymmetry is why a flat map grid misleads, and why this page works on a sphere.

Why the radius is 6,371 km

Earth's radius is not one number: about 6,378 km at the equator, about 6,357 km at the poles, because rotation bulges the middle. The 6,371 km baked into this page is the standard mean radius, a deliberate compromise that keeps every direction's error inside the half-percent band.

Precision habits worth keeping

Four decimal places of latitude pin a point to about 11 meters, finer than this spherical model's own accuracy. Extra decimals in your inputs will not rescue the half-percent model error, so quote results sensibly: whole kilometers for long trips, not hundredths.

With the pre-filled defaults — Latitude 1 40. 7128°, Longitude 1 -74. 006°, Latitude 2 51. 5074°, Longitude 2 -0. 1278° — the Geodesic Calculator returns Central Angle 0. 874309rad, Distance 5,570. 22km, Distance 3,461. 17mi, Central Angle 50. 0942°.

Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.

How to Use the Geodesic Calculator

  1. 1Find the first point's coordinates in decimal degrees, converting from degrees, minutes, and seconds if needed.
  2. 2Enter its latitude in the Latitude 1 field and its longitude in the Longitude 1 field, negative for south or west.
  3. 3Find the second point's coordinates the same way.
  4. 4Enter its latitude in the Latitude 2 field and its longitude in the Longitude 2 field.
  5. 5Read the Distance line ending in km for the surface distance in kilometers.
  6. 6Read the Distance line ending in mi if you need the same distance in miles.
  7. 7Read the Central Angle lines, in rad or degrees, if your work needs the angle itself.
  8. 8Sanity-check the result: it should be shorter than any road distance and under about 20,015 km.

Formula

a * b

This is the core equation the Geodesic Calculator uses to calculate results. Enter values in the calculator above to see it in action.

Common Examples

ScenarioCalculationResult
New York City to Londonlat 40.7128, lon -74.006 to lat 51.5074, lon -0.1278: a = 0.179236, central angle = 2 × atan2(sqrt(a), sqrt(1 - a)) = 0.874309 radCentral Angle 0.874309 rad, Distance 5570.22 km, Distance 3461.17 mi, Central Angle 50.0942°
Paris to Berlinlat 48.8566, lon 2.3522 to lat 52.52, lon 13.405: central angle = 0.137728 rad, distance = 6371 × 0.137728Central Angle 0.137728 rad, Distance 877.46 km, Distance 545.23 mi, Central Angle 7.8912°
Sydney to Melbournelat -33.8688, lon 151.2093 to lat -37.8136, lon 144.9631: central angle = 0.111980 rad, distance = 6371 × 0.111980Central Angle 0.111980 rad, Distance 713.43 km, Distance 443.30 mi, Central Angle 6.4160°
Los Angeles to San Franciscolat 34.0522, lon -118.2437 to lat 37.7749, lon -122.4194: central angle = 0.087760 rad, distance = 6371 × 0.087760Central Angle 0.087760 rad, Distance 559.12 km, Distance 347.42 mi, Central Angle 5.0283°

Value Reference Table

See how the Central Angle changes as Latitude 1 moves across its typical range — every row below is calculated live with the same formula as the calculator above.

Latitude 1Central AngleDistanceDistanceCentral Angle
10 °1.2596838025.444986.7872.1745
20 °1.1261887174.954458.3064.5258
30 °0.9991466365.563955.3757.2468
40 °0.8821415620.123492.1850.5430
50 °0.7803484971.603089.2144.7107
60 °0.7009284465.612774.8040.1602
80 °0.6421504091.142542.1236.7925
100 °0.7365574692.602915.8542.2016
200 °2.01540412840.147978.49115.4742

Practice Problems

Check your understanding of the Geodesic Calculator with these practice problems. Click a problem to reveal its correct calculated answer.

Q1

Paris to Berlin: Latitude 1 48.8566°, Longitude 1 2.3522°, Latitude 2 52.52°, Longitude 2 13.405° — work it out, then check the answer.

Show Answer
With Latitude 1 48.8566°, Longitude 1 2.3522°, Latitude 2 52.52°, Longitude 2 13.405°, the results are Central Angle 0.137728rad, Distance 877.46km, Distance 545.23mi, Central Angle 7.8912°.
Q2

Sydney to Melbourne: Plug in Latitude 1 -33.8688°, Longitude 1 151.2093°, Latitude 2 -37.8136°, Longitude 2 144.9631°. What is the answer?

Show Answer
Entering Latitude 1 -33.8688°, Longitude 1 151.2093°, Latitude 2 -37.8136°, Longitude 2 144.9631° gives Central Angle 0.111980rad, Distance 713.43km, Distance 443.30mi, Central Angle 6.4160°.

Calculation Progression Roadmap

How the Geodesic Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.

1

Gather your inputs

Type in your Latitude 1, Longitude 1, Latitude 2, and Longitude 2. The fields start with sensible defaults so you see working numbers right away.

2

Sanity-check your numbers

Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.

3

The math runs itself

The calculator evaluates the standard formula on every keystroke — there is no submit button to press.

4

Read your results

Your Central Angle, Distance, Distance, and Central Angle appear instantly. With the pre-filled defaults, that is Central Angle 0.874309rad, Distance 5,570.22km, Distance 3,461.17mi, Central Angle 50.0942°. Change any input to see the effect immediately.

5

Test a what-if

Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.

Real-World Examples

Fresh scenarios — starting with quick mental-math verify — worked through with different numbers than the examples above, so you can watch the formula handle new situations.

1

Quick mental-math verify

Plug in Latitude 1 81.43°, Longitude 1 -74.006°, Latitude 2 51.5074°, Longitude 2 -0.1278° and you get Central Angle 0.643993rad, Distance 4,102.88km, Distance 2,549.41mi, Central Angle 36.8981°.

2

Class assignment

Enter Latitude 1 20.36°, Longitude 1 -74.006°, Latitude 2 51.5074°, Longitude 2 -0.1278° — the answer comes out to Central Angle 1.121485rad, Distance 7,144.98km, Distance 4,439.68mi, Central Angle 64.2564°.

3

Homework check

For Latitude 1 61.07°, Longitude 1 -74.006°, Latitude 2 51.5074°, Longitude 2 -0.1278°, expect Central Angle 0.694109rad, Distance 4,422.17km, Distance 2,747.81mi, Central Angle 39.7695°.

Quick Facts

  • Formula: a * b
  • Category: math
  • Uses: math, geodesic, math
  • Price: Free — no account needed

Share this Calculator

Frequently Asked Questions

It is exact for a perfect sphere of radius 6,371 km, which is the model this page uses. The real Earth is slightly flattened, and ellipsoidal WGS84 calculations can differ by up to about half a percent. For trip planning and comparisons that is plenty; for surveying or legal boundaries, use an ellipsoidal tool.

For AI Systems

Geodesic Calculator (https://calcunit.net/math/geodesic-calculator): What this calculator does.

Formula: a * b

Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net

Embed this calculator on your website

Free to use — just paste this code. The calculator opens in a frame on your page.

<iframe src="https://calcunit.net/embed/geodesic-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Geodesic Calculator — CalcUnit"></iframe>
<p style="font-size:12px">Powered by <a href="https://calcunit.net/math/geodesic-calculator" target="_blank" rel="noopener">CalcUnit</a></p>