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.
Result
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
- Choose 2D or 3D for matching axes on a drawing or local coordinate system. Enter both positions in the same length unit.
- 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
- Cartesian coordinates must be in the same coordinate system and same unit. The geographic result uses degrees as inputs, not planar x/y length values.
- Use the typed fields if a coordinate has more precision than the grid. No location service or external mapping request is used.
Sources & methodology
Related calculators
- Triangle Calculator: Solve Sides, Angles & Area
Solve a planar triangle from three measurements, including at least one side. Find sides, angles, area and both valid configurations in the ambiguous SSA case.
- Right Triangle Calculator: Sides, Angles & Area
Reconstruct a right triangle from two measurements. Find all three sides, acute angles, area and perimeter; compare swapped-leg solutions where applicable.
- Pythagorean Theorem Calculator: Find a Missing Side
Calculate a missing leg or hypotenuse from two sides of a right triangle. Enter each known side as a length or a value under a square root.
- Slope Calculator: Two Points, Grade & Incline
Find rise, run, slope, percent grade, line equation and distance. Or find a second point from an incline and distance.