How this calculation works
Compute a constant-bearing spherical rhumb route with an explicit longitude-wrap convention.
ψ(φ)=asinh(tanφ); q=Δφ/Δψ; d=R√[(Δφ)²+q²(Δλ)²].A worked example
On a sphere of radius 6371, the route from (0°,0°) to (30°,40°) has distance approximately 5394.667752 and bearing approximately 51.803514°.
Good to know
Latitude strictly within ±89.9999°, longitude within ±720°, and radius 0 < R ≤ 1e9. Short mode wraps longitude change to [−180°,180°); unrolled mode keeps entered turns. Spherical model only; sample positions are uniform in Mercator coordinates, not distance.
Reference: GeographicLib authors: rhumb-line conventions (opens in a new tab) ↗
A constant bearing rather than a shortest route
A rhumb line crosses every meridian at one constant bearing. This makes it a natural mathematical model for maintaining a fixed heading on a sphere. Except for special cases such as an equatorial or meridional route, it is not the same path as the shortest great-circle connection.
The distinction becomes visible over large longitude or latitude changes. A great-circle course generally changes bearing along its path, while a rhumb route preserves bearing and can be longer. This calculator answers the constant-bearing question explicitly instead of reusing a great-circle distance with a different label.
Compare this with the Great circle intersection calculator from endpoint pairs. Compute a constant-bearing loxodrome rather than the shortest great-circle route.
Latitude, longitude and radius conventions
Enter each endpoint as latitude followed by longitude in degrees. Positive latitude is north and positive longitude is east. The sphere radius sets the distance unit: if it is entered in kilometers, the resulting distance is in kilometers. The numerical example uses radius six thousand three hundred seventy-one.
Poles are excluded because longitude and the Mercator coordinate become singular there. The page also limits coordinate ranges to maintain a finite bounded numerical calculation. It does not silently substitute an ellipsoidal Earth model or a reference-datum transformation when you enter familiar geographic coordinates.
The default route from the equator
The example begins at zero latitude and longitude and ends at thirty degrees north, forty degrees east. The latitude change is pi over six radians. The change in isometric latitude is approximately zero-point-five-four-nine-three-zero-six-one-four-four-three, which differs from the ordinary latitude change.
Combining that difference with the longitude change gives a bearing of approximately fifty-one-point-eight-zero-three-five-one-four degrees clockwise from north. The spherical rhumb distance is approximately five thousand three hundred ninety-four-point-six-six-seven-seven-five-two in the radius's distance unit. Those values describe one specific spherical model, not an exact surveying distance on Earth.
Using the Mercator coordinate
The isometric latitude psi equals asinh of tan latitude. A constant-bearing rhumb becomes a straight segment in longitude-versus-psi coordinates. The calculator uses the differences in those two coordinates to obtain its bearing and the scale factor relating longitude displacement to physical angular travel.
For unequal latitudes, the scale factor is latitude change divided by psi change. Near an east-west route, the expression approaches cosine of latitude, and that limiting form avoids dividing two almost equal small differences. This is why a route along a high-latitude parallel has a shorter circumference than the equator.
Choosing how longitude wraps
Short mode reduces the longitude difference to the interval from minus one hundred eighty degrees inclusive to plus one hundred eighty degrees exclusive. This selects the smaller-magnitude longitudinal turn. At an exactly opposite-longitude case, the declared half-open convention selects one of the two equal-magnitude directions.
Unrolled mode retains the entered difference, including additional turns around the sphere. The same geographic endpoint modulo a full turn can therefore produce a different distance and path. Choose that mode only when extra longitudinal winding is part of the intended route, not because an endpoint was written with a different equivalent longitude.
Reading the sampled route
The returned positions lie along the straight Mercator segment and therefore follow the constant-bearing curve. Their spacing is uniform in the Mercator interpolation parameter. It is not uniform in traveled spherical distance, so equal row intervals should not automatically be interpreted as equal elapsed times.
The bearing is undefined for coincident endpoints, and the interface states that nonuniqueness instead of presenting an arbitrary compass direction. Reversing an ordinary nonwinding route reverses its travel direction and preserves its distance. These simple cases help reveal swapped endpoint coordinates or an unexpected longitude-wrap choice.
Where this spherical result belongs
Use the calculator to compare navigation geometry, check loxodrome formulas or illustrate constant-course routes. For accurate geodesy, an ellipsoid and a documented datum can matter. A larger number of displayed decimal places does not make an assumed sphere equivalent to a terrestrial reference ellipsoid.
Before using the answer, compare a meridional route with radius times latitude change and an east-west route with radius times cosine latitude times longitude change. These analytic limits check units and bearing conventions independently. The page does not incorporate winds, currents, terrain or a vehicle's changing true heading.
A few questions, answered
Is a rhumb line always shortest?
No. A constant-bearing route generally differs from the shortest great-circle route on a sphere.
Which unit is the distance?
It uses the same distance unit as the supplied sphere radius.
What does unrolled longitude do?
It preserves the entered number of longitude turns instead of selecting a shortest wrap.
Are the route rows equally spaced by distance?
No. They are equally spaced in Mercator interpolation coordinates, not traveled distance.