Cross-Track Distance Calculator
Cross-track distance is the perpendicular offset of a point from an intended great-circle path. Navigators and surveyors use it to measure how far a vessel, aircraft or sample point has drifted from its planned track. Enter the path's start coordinates, the path's initial bearing, and the third point's coordinates to get the signed cross-track distance and the great-circle distance to that point. All formulas use spherical trigonometry on a mean-radius Earth model.
Cross-track distance formula
d13 = great-circle distance from path start to point
theta13 = initial bearing from path start to point
theta12 = path bearing
cross-track = asin( sin(d13 / R) * sin(theta13 - theta12) ) * R
The angular distance d13 / R is found with the haversine formula. The bearing theta13 is the initial great-circle bearing from the path start to the third point. The difference theta13 - theta12 isolates the perpendicular component, which is scaled by the Earth radius R to a linear distance.
Worked example
Path start (51.5 N, -0.1 E), path bearing 90 degrees, point (51.6 N, 2.0 E), R = 6,371.0088 km. The distance to the point is about 146.07 km and the bearing to it is roughly 85.8 degrees. The cross-track offset works out near -34 km, meaning the point lies to the left of a due-east track because its latitude is higher than the path would reach.
Cross-track distance: frequently asked questions
What is cross-track distance?
Cross-track distance (also called cross-track error) is the shortest distance from a point to a great-circle path. It is the perpendicular offset of the point from the intended track. A positive value typically means the point lies to one side of the path and a negative value the other, depending on sign convention.
What formula is used?
On a sphere, cross-track distance d_xt = asin( sin(d13 / R) * sin(theta13 - theta12) ) * R, where d13 is the great-circle distance from the path start to the third point, theta13 is the initial bearing from the path start to the third point, theta12 is the bearing of the path itself, and R is the Earth's radius. This is the standard spherical-trigonometry result published in Ed Williams' Aviation Formulary.
Which Earth radius should I use?
This calculator defaults to the IUGG mean Earth radius of 6,371.0088 km, which is editable. For most navigation purposes a spherical model gives sub-percent accuracy. Use a smaller jurisdiction-specific radius only if your reference data requires it.
Does a negative result mean an error?
No. The sign indicates which side of the path the point lies on. Take the absolute value if you only need the magnitude of the offset.
Sources and references
- National Geospatial-Intelligence Agency: Geodesy and geophysics reference.
- National Oceanic and Atmospheric Administration, National Geodetic Survey: geodesy fundamentals.
- Formula: standard spherical great-circle trigonometry (Ed Williams, Aviation Formulary; haversine method).
Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.