mapbench

How to Find the Halfway Point Between Two Cities

Why averaging two coordinates gives the wrong midpoint, how the spherical midpoint is actually calculated, and how to pick a fair meeting point for more than two people.

Aryan KhanNovember 2, 20263 min read
In brief

Why averaging two coordinates gives the wrong midpoint, how the spherical midpoint is actually calculated, and how to pick a fair meeting point for more than two people.

  • Convert both points to 3D unit vectors: x = cos φ · cos λ, y = cos φ · sin λ, z = sin φ.
  • Add the two vectors and normalise the result. If the sum is near zero the points are antipodal and the midpoint is undefined — the tool should say so rather than invent one.
  • Convert the normalised vector back to latitude and longitude: φ = asin(z), λ = atan2(y, x).

The obvious method — add both latitudes, divide by two, do the same for longitudes — is wrong for any pair of cities more than a short drive apart. It ignores the curvature of the route and fails completely across the date line. The correct approach treats the two points as vectors from Earth's centre and finds the halfway point along the great circle that joins them; a halfway point calculator does that in one step and returns a place you can click.

Why averaging fails

Averaging assumes the planet is flat. Between New York and London, the great circle bows north over the Atlantic while the arithmetic average sits further south on the same latitude band. Between Fiji and Samoa the average longitude lands somewhere in Africa, because −180° and +179° average to almost zero. The error grows with distance and becomes absurd near the antipodes.

The spherical midpoint, in three steps

  • Convert both points to 3D unit vectors: x = cos φ · cos λ, y = cos φ · sin λ, z = sin φ.
  • Add the two vectors and normalise the result. If the sum is near zero the points are antipodal and the midpoint is undefined — the tool should say so rather than invent one.
  • Convert the normalised vector back to latitude and longitude: φ = asin(z), λ = atan2(y, x).

Halfway is not the same as fair

The geographic midpoint is equidistant in straight-line terms, which is rarely what a group needs. If two people drive to meet, the fair spot depends on roads, not on geometry: a midpoint in the middle of a river or on a mountain with no pass is technically correct and practically useless. For more than two people the problem becomes a genuine optimisation — minimise total or worst-case travel time over the road network — and that is what a meeting point finder solves rather than a midpoint calculator.

Useful sanity checks

  • The midpoint should be equidistant from both endpoints, within rounding. If it is not, one input was wrong.
  • The bearing from the midpoint back to each endpoint should differ by close to 180°.
  • For very long routes the midpoint is often at a higher latitude than either endpoint — that is the great circle bowing poleward, not an error.
Useful tools for this topic

Continue with the actual map tools

AK

About the author

Aryan Khan edits MapBench with a focus on practical map calculations, coordinate systems, routing concepts, open geographic data and clear limitations. Guides are written to help a reader make a better decision, not just to repeat a definition.

Related reading