TrindoMaps .

A little further from familiar.

Cross-track distance calculator

Find how far a point is from the line between two places, and which point on the line is closest. Pick A, B and P on a globe or map and read the distance.

How to use the Cross-track distance calculator

The cross-track distance calculator measures how far a point is from the shortest path between two places, along Earth’s surface, and finds the closest point on that path. Navigators call the sideways distance cross-track error. It runs entirely in your browser and does not use your device’s location.

  1. Choose the two ends of the line, points A and B, then the point to measure, P, on the globe or map, or enter their coordinates.
  2. Read the distance from the line, which side of A to B the point is on, how far along the line it sits and where the closest point N is.
  3. Copy the result or fit the points on the map. Drag any of A, B or P to update everything.

The line is the shortest great-circle arc from A to B. Distances are along Earth’s surface, not roads or travel times. The closest point is on the arc between A and B, so it is an end when P lies beyond one. Coincident or opposite ends have no unique line.

Example

Dublin (53.3498, −6.2603) lies about 82.84 km (51.48 mi) to the right of the shortest path from London (51.5074, −0.1278) to New York (40.7128, −74.0060). The closest point on the path is near 52.6250°N, 6.5467°W, 455.86 km along from London.

Try this example in the tool

What cross-track distance measures

The shortest path between two places on Earth is an arc of a great circle. The cross-track distance is how far a third point lies from that great circle, measured along the surface at a right angle to it. Navigators call the same quantity cross-track error when it describes how far a ship or aircraft has drifted from its planned track.

The great circle is treated as running all the way round the globe, so the distance is to the whole circle through A and B, not just the stretch between them. The side is given as seen travelling from A towards B, and it swaps if you swap the two ends.

The closest point and the distance along the line

The tool also finds the closest point on the arc between A and B and shows it as the pin N. When P is level with some part of the arc, N is the foot of the perpendicular, and the distance along the line is how far that is from A. When P lies beyond an end, no perpendicular reaches the arc between A and B, so N is the nearer end and the distance along the line is longer than the arc or negative.

Distances are measured along Earth’s surface, treating Earth as a sphere with a mean radius of 6,371.0088 km, so they can differ from ellipsoidal survey results by a fraction of a percent. They are not road distances or travel times.

When there is no result

Two identical ends do not define a line, and exactly opposite ends have infinitely many shortest paths, so the tool asks you to move one end. A point exactly a quarter of the way round the globe from the line is the same distance from every point of it, so it has no single closest point either.

Common questions

What is cross-track distance?

It is the shortest distance from a point to a great-circle line, measured at a right angle to the line. In navigation it is called cross-track error: how far off the planned track you are.

Why does the tool also give a closest point on the line from A to B?

A great circle goes all the way round the globe, but your line may stop at A and B. If the point is level with a part of the path beyond either end, the closest point of the line from A to B is that end.

Which side is left and which is right?

Left and right are as seen travelling from A towards B along the shortest path. Swapping A and B swaps the sides.

Why is there no result for some points?

Identical ends do not define a line, exactly opposite ends have many shortest paths, and a point exactly a quarter of the way round the globe from the line is the same distance from all of it.

Related tools

Read the FAQ for more help, or explore all sixteen tools.