Paritian

Mathematics

Distance Between Two Points

Straight-line distance, midpoint and direction angle between two coordinates.

Results

Distance 10.000000
Midpoint x 6.000000
Midpoint y 6.000000
Angle 36.8699 °

What this tool does

This is Pythagoras applied to a coordinate grid, and it is the calculation behind setting out on site, CNC programming and any map that uses a local grid. The angle is measured anticlockwise from the positive x axis.

Formula

d = √((x₂−x₁)² + (y₂−y₁)²)

Variables

SymbolMeaningUnit
x1x₁
y1y₁
x2x₂
y2y₂
DDistance
MXMidpoint x
MYMidpoint y
AGAngle°

Worked example

  • x₁2
  • y₁3
  • x₂10
  • y₂9
  • Distance10.000000
  • Midpoint x6.000000
  • Midpoint y6.000000
  • Angle36.8699 °

Limitations

  • The calculation runs at full precision and only the display is rounded. If you copy an intermediate value and retype it, small differences can appear.