Skip to content

2D Distance Calculator

Measure straight-line distance between two points and see the horizontal, vertical and diagonal parts on a true-scale coordinate diagram.

Calculation inputs

Precision & interpretation

This is a Euclidean plane calculation, not a latitude/longitude or road-distance model. Exact rational or radical form is retained for decimal inputs; a decimal approximation is shown alongside it.

Calculation results

Distance d5Exact distance 5
Horizontal change Δx3
Vertical change Δy4
Midpoint(3/2, 2)
Step-by-step solution
  1. Choose the formula

    d = √((x₂−x₁)² + (y₂−y₁)²)
  2. Substitute your inputs

    d = √((3)² + (4)²)
  3. Calculate in order

    d = 25
  4. Write the result

    d = 5

Distance on the coordinate plane

Coordinate segment-1.24.70.153.351.522.850.654.2-0.7AABBxy

Both axes use the same scale; each coordinate unit has the same geometric size.

Decimal coordinates are interpreted exactly (up to six decimal places). Diagram coordinates and decimal distances use floating point.

Exact value & calculation details
5
QuantityValue
Point A(0, 0)
Point B(3, 4)
Midpoint(3/2, 2)
Distance (decimal)5
Distance (exact)5

Understand the calculation

Concept & meaning

The straight-line distance is the hypotenuse of the right triangle formed by the coordinate differences. Squaring removes their signs; the final distance is nonnegative.

Formula & special cases

Both coordinates must use the same physical unit and the axes the same scale. The plotted axes use equal geometric scale, so the drawing does not distort angles or distances.

Precision & limitations

This is a Euclidean plane calculation, not a latitude/longitude or road-distance model. Exact rational or radical form is retained for decimal inputs; a decimal approximation is shown alongside it.

d=(x2−x1)2+(y2−y1)2

Worked example from your inputs

Exact distance 5 = 5

Sources & References

OpenStax official logoOpenStax · CoordinatesDistance, midpoint and Cartesian coordinatesRead the referenceOpenStax official logoOpenStax · Complex numbersModulus, argument and polar representationRead the reference

References explain the mathematics; they do not imply institutional endorsement.