Math / calculator

Distance Calculator

Measure straight-line Euclidean distance between two 2D or 3D coordinates with a stable hypot calculation and shared coordinate units.

Calculator

Calculator

Calculate coordinate distance.

Euclidean distance in 2D or 3D. Coordinates use one common length unit. This is not geographic, route or driving distance.

Inputs and options

Your result

Enter details to see the result.

Complete the inputs and calculate to see the main result and its supporting breakdown.

Example

Worked example

Example inputs

Dimensions
2D
X1
0
Y1
0
X2
3
Y2
4

Calculation breakdown

2D d=hypot(x2−x1,y2−y1); 3D adds z2−z1 under the same Euclidean norm.

Example result

Coordinate distance

5 length units

Straight-line Euclidean distance in the selected dimension.

How to interpret the result

Distance is the length of the straight segment joining your points. Switching to 3D includes the z displacement; it does not change the interpretation into geographic or road distance.

How to use this calculator

  1. Select a two-dimensional plane or three-dimensional space.
  2. Enter both points with matching x, y and optional z coordinates.
  3. Calculate their direct Cartesian distance in the input length unit.

How it works

Formula

2D d=hypot(x2−x1,y2−y1); 3D adds z2−z1 under the same Euclidean norm.

Can coordinates be negative?

Yes. Signed coordinates are valid; the Euclidean distance is nonnegative and is zero when both points coincide.

What this calculator does

Measure the straight line between two points in two or three dimensions; it is not a road or route distance.

Inputs you will need

Some inputs appear only for the operation or shape you select.

Required or selected inputs

  • Dimensions
  • X1
  • Y1
  • Z1
  • X2
  • Y2
  • Z2

Assumptions

  • Coordinates lie in an ordinary Cartesian plane or three-dimensional space using one length unit.

Limitations

  • No geographic curvature, map routes or travel distance is modeled. Coordinate magnitudes are limited to 10^150 and output remains finite.

Useful next steps

Inspect the rise and run between two planar points with Slope Calculator.

See how HandyChest handles units, validation, rounding, and testing, or Report a problem with this calculator.

Good to know

Frequently asked questions

How should I read the distance result?

Distance is the length of the straight segment joining your points. Switching to 3D includes the z displacement; it does not change the interpretation into geographic or road distance.

Keep going