Home Math & Science Distance Calculator

Distance Calculator

Find the distance between two points in 2D or 3D space, or the great-circle distance between two latitude/longitude coordinates.

Choose a mode

Distance

How to use this calculator

1. Pick the right mode

Use 2D for flat coordinates, 3D when a height or depth (z) matters, and Coordinates for points on the globe given as latitude and longitude.

2. Enter both points

Fill in each coordinate for point 1 and point 2. For map coordinates, use decimal degrees with negative values for south latitudes and west longitudes.

3. Read the distance

The large number is the straight-line distance. In coordinate mode you also get the great-circle distance in both kilometres and miles.

About distance calculations

How are point distances found?

On a plane the distance is √((x₂ − x₁)² + (y₂ − y₁)²), an application of the Pythagorean theorem. In 3D a (z₂ − z₁)² term joins the sum under the root for the straight-line distance.

What is the haversine formula?

For coordinates on a sphere, the haversine formula gives the great-circle (shortest surface) distance. We use an Earth radius of 6371 km and convert to miles with a factor of 0.621371.

Why isn't it exact for real travel?

Great-circle distance assumes a perfect sphere and ignores roads, terrain and the Earth's slight flattening. It is excellent for "as the crow flies" estimates but not driving distance.