Ad Space — Top Banner

Cross-Track Distance Formula

Calculate how far off course a vessel or aircraft has drifted from the intended route.
Uses angular distance and bearing difference.

The Formula

dxt = arcsin(sin(d13 / R) × sin(θ13 − θ12)) × R

The cross-track distance formula tells you how far you have drifted from your intended path. Imagine you are sailing from point A to point B, but wind and currents have pushed you to point C. The cross-track distance is the shortest perpendicular distance from your current position C to the original route line AB. This is different from simply measuring how far you are from your destination. You might be quite close to your target but far off the intended route, which matters when the route was chosen to avoid obstacles like reefs, restricted airspace, or mountains.

The formula works on a spherical Earth model by using angular distances and bearings. First, you calculate the angular distance from the start point A to your current position C. Then you find the bearing from A to C and compare it to the bearing from A to your destination B. The difference between these two bearings, combined with the angular distance, gives you the perpendicular offset from the route. A positive result means you have drifted to the right of the route, while a negative result means you have drifted to the left. This convention follows standard nautical practice. The formula uses the Earth's radius R, which is approximately 6,371 km or 3,959 miles, to convert from angular values to actual distance. Modern GPS devices and autopilot systems compute cross-track distance continuously and display it as XTE or XTD on the navigation screen. Pilots and mariners use this value to make course corrections. In aviation, remaining within a specified cross-track tolerance is mandatory on many routes, especially in congested airspace or on instrument approaches where terrain clearance depends on staying on the centerline.

Variables

SymbolMeaning
dxtCross-track distance (km or miles). Positive = right of course, negative = left.
d13Distance from start point (A) to current position (C)
θ13Bearing from start point (A) to current position (C) in radians
θ12Bearing from start point (A) to destination (B) in radians
REarth's radius (6,371 km or 3,959 miles)

Example 1: Sailboat Off Course

A sailboat departed from point A heading to point B on a bearing of 090°. After 50 km, its actual position C is at a bearing of 095° from A. How far off course is it?

Convert to radians: θ12 = 90° = 1.5708 rad, θ13 = 95° = 1.6581 rad

dxt = arcsin(sin(50 / 6371) × sin(1.6581 − 1.5708)) × 6371

dxt = arcsin(sin(0.00785) × sin(0.0873)) × 6371

dxt = arcsin(0.00785 × 0.0872) × 6371

dxt = arcsin(0.000684) × 6371

dxt ≈ 4.36 km to the right of the intended course

Example 2: Aircraft Route Deviation

An aircraft departed on a bearing of 270° (due west). After flying 200 km, its bearing from the departure point is 265°. What is the cross-track error?

Convert: θ12 = 270° = 4.7124 rad, θ13 = 265° = 4.6251 rad

dxt = arcsin(sin(200 / 6371) × sin(4.6251 − 4.7124)) × 6371

dxt = arcsin(sin(0.03139) × sin(−0.0873)) × 6371

dxt = arcsin(0.03139 × (−0.0872)) × 6371

dxt ≈ −17.4 km (17.4 km to the left of the intended route)

When to Use It

Cross-track distance is used whenever you need to know how far you have strayed from a planned route.

  • Marine navigation to stay within shipping lanes and avoid hazards
  • Aviation route tracking and instrument approach procedures
  • GPS autopilot systems that steer back toward the planned course
  • Search and rescue operations to define sweep widths
  • Hiking and backpacking GPS apps to warn of route deviation
  • Drone flight planning to maintain corridor compliance

Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.