AAfterTom
AfterTom › Guides › How to Measure Distance and Area Between Coordinates

How to Measure Distance and Area Between Coordinates

Published 2026-12-04 · by the AfterTom team · 6 min read

The method depends on your coordinates. If they are projected X and Y in metres (UTM, Lambert), you use simple geometry. If they are latitude and longitude, you need a formula that follows the curve of the Earth.

Case 1: Distance between two projected points

With X (easting) and Y (northing) in metres, use Pythagoras:

distance = √((X2 − X1)² + (Y2 − Y1)²)

Example

A = (500,000 ; 300,000) and B = (500,300 ; 300,400).

ΔX = 300, ΔY = 400, so distance = √(300² + 400²) = √250,000 = 500 m.

Check the system. Both points must be in the same projected system. Grid distance is very slightly different from true ground distance because of the projection scale factor. For UTM this is under 0.1% near the centre line of the zone, which is fine for most work.

Case 2: Distance between two latitude/longitude points

Do not use Pythagoras on degrees. A degree of longitude shrinks as you move away from the equator. Use the haversine formula, which treats the Earth as a sphere with radius R = 6,371 km:

a = sin²(Δφ/2) + cos φ1 · cos φ2 · sin²(Δλ/2)
distance = 2 · R · atan2(√a, √(1 − a))

where φ is latitude and λ is longitude, in radians. For short distances under about 100 km it is accurate to roughly 0.3%. For survey work over any size, convert to a projected system first, or use an ellipsoidal method such as Vincenty or Karney.

Example: Paris to London

Paris (48.8566° N, 2.3522° E) to London (51.5074° N, 0.1278° W). The great-circle distance on the WGS84 ellipsoid is about 343.9 km.

A common trap: convert both points to Web Mercator (EPSG:3857, the projection of Google Maps) and apply Pythagoras. You get about 537 km, which is wrong by more than 50%. Web Mercator stretches distances at high latitudes. Never measure with it.

Example: two points in UTM zone 31N

The Eiffel Tower is at 31N 448,252 / 5,411,955. A point 3 km east is at 451,415 / 5,412,171. Pythagoras on the UTM numbers gives 3,170.8 m. The ellipsoidal distance between the same two points is 3,172.0 m. The difference is about 1.2 m over 3 km, or 0.04%.

Area from corner coordinates (the shoelace formula)

For a plot with corners listed in order around the boundary, projected coordinates give the area directly:

Area = ½ · | Σ (Xi · Yi+1 − Xi+1 · Yi) |

Go through the corners in order (clockwise or anticlockwise), multiply across, add, take the absolute value and halve it. The last corner connects back to the first.

Example: a triangular plot

Corners: P1 = (500,000 ; 300,000), P2 = (500,100 ; 300,000), P3 = (500,150 ; 300,080).

Shift so P1 is at the origin to keep the numbers small: P1 = (0, 0), P2 = (100, 0), P3 = (150, 80).

  • X1·Y2 − X2·Y1 = 0·0 − 100·0 = 0
  • X2·Y3 − X3·Y2 = 100·80 − 150·0 = 8,000
  • X3·Y1 − X1·Y3 = 150·0 − 0·80 = 0

Sum = 8,000, half of that is 4,000 m² (0.4 hectare). Side lengths: 100 m, √(50² + 80²) = 94.34 m, √(150² + 80²) = 170 m, so the perimeter is about 364.3 m.

Example: a rectangular plot

Corners (0,0), (120,0), (120,80), (0,80). Shoelace sum = 0 + 9,600 + 9,600 + 0 = 19,200, half is 9,600 m². That is simply 120 × 80. The formula works for any shape, convex or not, as long as the boundary does not cross itself.

If your corners are latitude and longitude, convert them to a projected system first (UTM or your national grid), then use the shoelace formula. Using degrees directly will not give square metres.

Measure distance and area onlineEnter points in X and Y, pick your coordinate system, and get the distance, perimeter, area and polyline length. You can export the result to DXF, XLS or TXT.

Open the distance and area tool →

Common mistakes

Frequently asked questions

How do I convert square metres to hectares?

Divide by 10,000. 4,000 m² is 0.4 ha. One hectare is 100 m × 100 m.

Which is more accurate, grid distance or ground distance?

Ground distance on the ellipsoid is closer to a tape measure. Grid distance is slightly different because of the projection scale factor. For small plots the difference is usually below the survey tolerance.

Can I measure from latitude and longitude only?

Yes, with haversine for distance. For area, convert to a projected system first.