Distance Calculator: 2D, 3D & Earth Coordinates

Find straight-line distance between two points in a plane or in space. For latitude and longitude, estimate the shortest surface arc on a spherical Earth.

Decimal: −90 to +90. DMS example: 40 30 0 N.
Decimal: −180 to +180. DMS example: 73 30 0 W.

Example: 1,250.50. Use a period for decimals.

Result

Enter values and select Calculate.

How is this calculated?

For aligned Cartesian points, use the vector norm of coordinate differences. Geographic inputs give the shorter arc on a fixed-radius sphere.

Worked example: Find the diagonal through a 3D box

From (0,0,0) to (3,4,12), the distance is √(9 + 16 + 144) = 13 in the same unit as the coordinates.

Method and limits

Only the fields for the chosen model are used. For DMS enter text such as 40 42 46 N. Cartesian mode subtracts the typed decimal coordinates before rounding the differences. The spherical Earth model uses a mean radius of 6371.0088 km. In decimal-degree mode, type coordinates or select either point on the local latitude–longitude grid. The grid is not a street or navigation map; the calculation excludes elevation, ellipsoidal corrections and travel routes.

How to use this calculator

  1. Choose 2D or 3D for matching axes on a drawing or local coordinate system. Enter both positions in the same length unit.
  2. For positions on Earth, choose decimal degrees or degrees–minutes–seconds (DMS). In decimal form use negatives for south or west, or choose positions on the optional grid.

Find a 3D diagonal

Across a 3 × 4 × 12 rectangular box, the diagonal is 13. The first two changes give a diagonal of 5 in the bottom plane; the rise of 12 then gives √(5² + 12²) = 13.

When flat coordinates work

Two points with the same x and y but different heights are identical in 2D and distinct in 3D. Match the axes and keep all values in one unit; mixing a horizontal measurement in metres with a height in centimetres changes the answer.

What the distance on Earth means

The shortest arc along a spherical surface is the central angle in radians multiplied by a mean radius of 6,371.0088 km. For two equatorial points 90° apart, the central angle is π/2 and the distance is about 10,007.56 km. Crossing the longitude line at ±180° uses the shorter arc.

Read a coordinate copied from a map

Decimal coordinates store north or east as positive. West longitude 73°30′ can be entered as −73.5 in decimal mode or as 73 30 0 W in DMS mode. Typing retains the precision supplied by the map; clicking the schematic grid rounds to two decimal places.

Frequently asked questions

Does this calculate road distance or driving time?
No. The geographic modes give the shortest modeled surface arc. They do not see roads, travel restrictions, bridges, terrain or routes.
Can I type coordinates without using the grid?
Yes. The fields work without any pointer interaction. The grid is a local drawing with no map tiles, live GPS or place search.
Can I use feet or metres in Cartesian mode?
Either works, provided every axis uses the same unit. The calculated length uses that unit; the tool does not convert the coordinate values.
Is the Earth result suitable for surveying?
No. It assumes a fixed-radius sphere and leaves out elevation, ellipsoid corrections and local reference systems.

Common mistakes and limits

Sources & methodology

Related calculators