Cross-Track Error and Course Correction Calculator
Calculate cross-track error and bearing correction to return to a planned course.
Find the intercept angle needed from your current position.
Cross-Track Error (XTE) Cross-track error measures how far off your planned course you are — perpendicular to the route. Also called: cross-course error, cross-track distance, lateral error. XTE = 0: you are on the planned track. XTE > 0: you are to the right of track. XTE < 0: you are to the left of track.
Formula (Spherical Earth) Given the planned course from waypoint A to waypoint B, and current position P: XTE = asin(sin(d_AP/R) × sin(θ_AP − θ_AB)) Where: d_AP = distance from A to current position P (in radians × R) θ_AP = bearing from A to current position P θ_AB = planned bearing from A to B (planned course) R = Earth’s radius (6,371 km) All angles in radians for the formula.
Along-Track Distance (ATD) ATD = acos(cos(d_AP/R) / cos(XTE/R)) × R How far along the planned track you have effectively traveled.
Intercept Heading To return to track at the next waypoint B: Correction angle = atan2(XTE, distance_to_B) New heading = bearing from P to B.
Practical Navigation GPS devices automatically calculate and display XTE. Alarm threshold: typically set to 0.05–0.5 nm (100–900 m) depending on context. In the open ocean: ±5 nm acceptable. Near reefs/coast: ±0.1 nm critical. XTE alarm allows skipper to focus on other tasks while GPS monitors deviation.
Units Marine navigation: nautical miles (nm). 1 nm = 1.852 km = 1 minute of latitude. Aviation: nm or km. Road navigation: km or miles.
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.