Calculators & Converters

Coordinate Distance Calculator

Measure the Euclidean distance between two Cartesian points in a plane or in three-dimensional space. The calculator also reports the midpoint, signed coordinate differences, and squared distance. Its diagram shows the XY projection with the same scale on both displayed axes.

Free online tool

Loading tool…

Coordinate Distance Calculator inputs

Changing the unit relabels the numbers. Convert measurements to one common unit before entering them.

Coordinates can be negative or zero and must lie between −1,000,000,000 and 1,000,000,000. Use the same linear scale on all axes. Latitude and longitude need a geographic distance formula.

Calculated measurements

Euclidean distance
5 units
All calculated values
MeasurementValue
Euclidean distance5 units
Midpoint(1.5, 2)
Δx3 units
Δy4 units
Squared distance25 units²
P₁P₂ΔxΔyXY projection: 5 units
XY projection with equal scales on both axes. Dashed legs show coordinate differences.

Formula: d = √[(x₂ − x₁)² + (y₂ − y₁)²]

Cartesian coordinates must use the same linear unit on every axis. The plot shows the XY projection; a 3D distance can exceed its plotted length.

Results use full floating-point precision internally and display up to 10 significant digits. Angles are in degrees.

Calculations run locally in your browser. Measurement values are not sent to a calculation service. The downloadable text contains your selected inputs and computed results.

GET STARTED

How to use the Coordinate Distance Calculator

  1. 01

    Choose 2D points or 3D points.

  2. 02

    Enter each coordinate, including zero and negative values where appropriate.

  3. 03

    Use one consistent linear unit and the same scale on every coordinate axis.

  4. 04

    Review distance and midpoint, then copy or download the point definitions and results.

Examples

The familiar 3–4–5 distance

From (0, 0) to (3, 4), Δx = 3, Δy = 4, distance = 5, and midpoint = (1.5, 2). Squared distance is 25.

Negative coordinates

From (−2, 5) to (4, −3), the differences are 6 and −8. Distance is 10 and midpoint is (1, 1). Signs affect direction but disappear when the differences are squared.

A spatial diagonal

From (0, 0, 0) to (2, 3, 6), squared distance is 4 + 9 + 36 = 49, so distance is 7. The XY projection is only √13, approximately 3.605551275.

Subtract coordinates before squaring

For each axis, subtract the first point’s coordinate from the second. In 2D, distance is √(Δx² + Δy²); 3D adds Δz² inside the square root. Reversing the point order changes the signs of the differences but leaves the final distance unchanged.

Midpoint averages each coordinate

The midpoint lies halfway along the straight segment. Its x-coordinate is (x₁ + x₂)/2, with the same averaging rule for y and, in 3D, z. This differs from the distance calculation: midpoint uses coordinate sums, while distance uses differences. Coincident points have zero distance and their shared position as the midpoint.

The plot is an XY projection

A browser diagram has two displayed dimensions. The tool plots x and y with equal scales and uses dashed component legs to illustrate horizontal and vertical differences. In 3D mode it does not draw a perspective model; two spatial points with identical x and y can overlap on the plot while having nonzero distance along z.

Cartesian coordinates need compatible scales

This formula describes flat Cartesian space with matching linear units on each axis. Geographic latitude and longitude are angles on Earth and cannot be substituted directly for x and y to obtain ground distance. Likewise, pixels from axes with different physical scales must first be converted to a common linear scale.

What to know

  • Cartesian Euclidean distances only; no geographic, geodesic, or route calculations.
  • Coordinates are bounded to ±10⁹; output is a floating-point approximation, and the plot shows XY only.

Common questions

Are negative coordinates valid?

Yes. Coordinates are positions relative to an origin, so zero and negative entries are valid. Each coordinate is bounded to ±10⁹.

What happens when the points are identical?

Distance and all differences are zero. The midpoint is the same point. This is a valid input, unlike a zero-length side in a shape calculator.

Does the tool calculate route distance?

No. It gives the straight-line segment length in Cartesian space, without roads, obstacles, or travel constraints.

Why can a 3D distance be larger than the plot?

The plot omits the z difference. Adding Δz² can only increase or preserve the full distance relative to its XY projection.

Sources & references