Earth Shape Calculator

Compare spherical haversine distance with a flat-plane distance approximation for two latitude and longitude points.

968.0K uses Updated · 2026-05-24 Runs locally · zero upload
AD

How to Use Earth Shape Calculator

Enter latitude and longitude for the first point and the second point. Latitudes should be between -90 and 90, and longitudes should be between -180 and 180. The default example compares New York and Los Angeles.

Choose the model you want highlighted. Sphere mode makes the haversine result the primary answer, while flat mode makes the planar approximation the primary answer. Both values are still shown so the difference is visible.

Use the flat scale factor only when you want to demonstrate a custom planar assumption. A factor of 1 leaves the raw planar estimate unchanged; values above or below 1 stretch or shrink that estimate.

Formula & Theory - Earth Shape Calculator

The Earth Shape Calculator computes spherical distance with the haversine formula: a = sin²(delta latitude divided by 2) + cos(lat1) cos(lat2) sin²(delta longitude divided by 2), then distance = 2R atan2(sqrt(a), sqrt(1-a)), using Earth radius about 6371 km.

The flat approximation converts latitude difference to kilometers and longitude difference to kilometers adjusted by the average latitude cosine, then applies the Pythagorean theorem. This works reasonably over short distances but drifts over long distances or high latitudes because Earth curvature and map projection effects become more important.

Use Cases for Earth Shape Calculator

  • Teach why spherical geometry matters for long-distance travel.
  • Compare quick map estimates with great-circle distance.
  • Demonstrate how flat approximations become less reliable at large scales.

Frequently asked questions about Earth Shape Calculator

How does the Earth Shape Calculator work?

The Earth Shape Calculator computes spherical distance with the haversine formula: a = sin²(delta latitude divided by 2) + cos(lat1) cos(lat2) sin²(delta longitude divided by 2), then distance = 2R atan2(sqrt(a), sqrt(1-a)), using Earth radius about 6371 km.

When should I use the Earth Shape Calculator?

Teach why spherical geometry matters for long-distance travel.

Is my data stored?

No. All calculations happen in your browser; nothing is sent to a server.