Your Equation

Library / Foundations: Maths / FMA-36

Foundations: Maths

Distance between two points

Pythagoras applied to the coordinate differences between two points.

Ref
FMA-36
Rev
v1
Field
Foundations: Maths
Result
d [m]

(x₁, y₁) and (x₂, y₂) are the two points in the same grid, with both coordinates in the same unit. The distance is the hypotenuse of a right-angled triangle whose legs are the east–west and north–south differences. The bearing is measured clockwise from grid north.

Pythagoras applied to the coordinate differences between two points.

Calculator

Solve for
m
m
−1,0001,000
m
−1,0001,000
m
−1,0001,000
m
−1,0001,000
  • East–west difference Δx3 m
  • North–south difference Δy4 m
  • Bearing from grid north36.87 °

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Distance (m) current value 5 m
y1y of first pointKey driver
1,010
x1x of first point
1,000
y2y of second point
3.611,000
x2x of second point
4.121,000
  • Moving both points by the same amount changes nothing, because only the differences enter.
  • Cutting the corner saves distance: the default route along the two legs is 7 m, but the straight line is 5 m.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing (m)Local stepChange in result
y1 y of first point−1,000 to 1,000 m51,0061,001+40 m+622 %
x1 x of first point−1,000 to 1,000 m51,004999+40 m+644 %
y2 y of second point−1,000 to 1,000 m3.6061,002998.4+40 m+782 %
x2 x of second point−1,000 to 1,000 m4.1231,001996.9+40 m+764 %

Sweep of y of second point

y of second point (m)Distance (m)
−1,0001,002
−750752
−500502
−250252
03.606
250248
500498
750748
1,000998

Sweep one variable

Distance (m)Hover, touch, or use the arrow keys on the chart
02004006008001000 −1000−50005001000 y of second point (m) now 5

Variables and how each one contributes

d

Distance

Result · m

What the equation gives you. Everything else feeds it.

x1

x of first point

m · typical −1,000 to 1,000

East–west coordinate of the first point. Only the difference x₂ − x₁ matters. Moving the first point away from the second raises the distance; moving it towards the second lowers it.

y1

y of first point

m · typical −1,000 to 1,000

North–south coordinate of the first point. Only the difference y₂ − y₁ matters. Moving the first point away from the second raises the distance; moving it towards the second lowers it.

x2

x of second point

m · typical −1,000 to 1,000

East–west coordinate of the second point. Only the difference x₂ − x₁ matters. Moving the second point away from the first raises the distance.

y2

y of second point

m · typical −1,000 to 1,000

North–south coordinate of the second point. Only the difference y₂ − y₁ matters. Moving the second point away from the first raises the distance.

Worked example with the values above

  1. Differences: Δx = 4 − 1 = 3 m, Δy = 6 − 2 = 4 m.
  2. Squares: 9 + 16 = 25.
  3. d = √25 = 5 m.

Assumptions and limits

  • Both points are on one flat grid with the same scale on both axes.
  • Coordinates are in the same unit; over long distances the curvature of the Earth makes a grid distance differ from the true one.

Common mistakes

  • Adding the two differences instead of squaring, adding and rooting.
  • Reading eastings and northings in the wrong order for one of the points.

Statistics and uncertainty

If each coordinate of each point carries an independent error σ, the error in the straight-line distance is about √2 σ along the line joining them, whatever the distance. A grid reference good to ±10 m therefore gives a separation good to about ±14 m.

Where it is used

  • Distance between two grid references.
  • Range from an observer to a target in map coordinates.

Maths you need

  • Pythagoras: a² + b² = c²
  • Coordinates: x and y positions on a grid

Related formulas

Practise this formula