ForHosting KIT · Travel & geography

Rhumb line distance calculator

Measure the length of a constant-heading route between two points: from 51.5074, -0.1278 to 40.7128, -74.006 the rhumb line is 5794.128754 km at a steady 258.044081°. Results come in metres, kilometres, statute or nautical miles. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Lat1
51.5074
Lon1
-0.1278
Lat2
40.7128
Lon2
-74.006
You get
Distance
5,794.128754 km
Distance m
5,794,128.753916
Bearing deg
258.044081
Radius m
6,371,008.8

This rhumb line distance calculator measures the constant-bearing path — the loxodrome — between two latitude and longitude points on a spherical model of the Earth. Unlike a great-circle route, which changes course continuously, a rhumb line keeps the same compass heading from start to finish, which is why it still appears on nautical charts and simple flight-planning worksheets. The engine uses the classic spherical formulas with isometric latitude, a configurable sphere radius (defaulting to the IUGG mean Earth radius), and optional output units in metres, kilometres, statute miles, or nautical miles. Every evaluation is fully deterministic: there are no network lookups, no sampling, and no date-dependent shortcuts.

Where constant-bearing distance fits in navigation study, charts, and software

Students meet rhumb lines when a geography or navigation textbook contrasts Mercator chart courses with great-circle tracks, when a contest problem asks for a constant-heading distance without ellipsoid libraries, or when they convert between compass courses and surface length before plotting. Teachers can pre-generate answer keys for modest lat-lon pairs without trusting opaque map apps that silently switch between geodesic and rhumb models or change the Earth radius.

Developers call the same contract from scripts to seed deterministic test vectors for chart renderers, to normalise user-entered waypoints before simple autopilot demos, or to satisfy programming-challenge statements that demand a loxodrome length rather than a hand-waved map scale. Contest practice often needs a fast, offline source of constant-bearing distances so solutions can be checked without proprietary GIS under time pressure. Product and education tools use the evaluation when a learner types two points and the UI must show kilometres and a bearing label.

Chart and homework checks

Measure constant-bearing rhumb distances between textbook lat/lon pairs and verify course length before plotting on a Mercator chart.

Routing demos and tutoring software

Normalise user-entered waypoints into a spherical loxodrome length and heading for simple autopilot demos and interactive lessons.

What does the rhumb line distance calculator cost?

It is free in your browser on this page.

How is rhumb-line distance different from great-circle distance?

A great circle is the shortest path and changes bearing along the way. A rhumb line keeps a constant compass heading and is usually longer except on the equator or a meridian.

What coordinate ranges are accepted?

Latitude must be strictly between −90 and 90 degrees (poles are rejected because isometric latitude is singular there). Longitude must be between −180 and 180 degrees inclusive.

Which Earth radius and units are used?

By default the sphere radius is 6371008.8 m (IUGG mean Earth radius) and distance is reported in kilometres. You can set radius in metres and unit to m, km, mi, or nmi.

Is the result deterministic?

Yes. The engine uses only closed-form floating-point arithmetic with no network calls, randomness, or date dependence, so the same inputs always yield the same rounded outputs.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/geo/rhumb-distance

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/geo/rhumb-distance \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lat1":51.5074,"lon1":-0.1278,"lat2":40.7128,"lon2":-74.006}'
{
  "lat1": 51.5074,
  "lon1": -0.1278,
  "lat2": 40.7128,
  "lon2": -74.006
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geo.rhumb_distance",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

lat_min-90
lat_max90
lon_min-180
lon_max180
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What a rhumb line is and what the response contains

A rhumb line, also called a loxodrome, is a curve on the sphere that crosses all meridians at a constant angle. On a Mercator chart it draws as a straight line, which made it the practical sailing course for centuries even though it is longer than the great-circle (orthodrome) path between the same two points except along the equator or a meridian. This calculator returns that surface length for a spherical Earth of radius R, together with the constant bearing from true north measured clockwise in degrees from zero to three hundred sixty. The numeric payload includes the normalised start and end latitudes and longitudes, distance in the requested unit, the same distance always echoed in metres as distance_m for unambiguous comparison, the unit tag, bearing_deg, the radius used in metres, the method tag rhumb_line, the decimal precision applied, and a short formula string so API consumers can document the model without reopening the source. There is no geodesic ellipsoid path here and no iterative Vincenty solver: the engine either evaluates the closed spherical rhumb formulas inside the supported coordinate ranges or rejects the input with invalid_input. Rejected cases include missing coordinates, non-finite values, latitude outside the open interval from negative ninety to ninety degrees, longitude outside the closed interval from negative one hundred eighty to one hundred eighty degrees, and exact poles where the isometric latitude becomes singular.

How coordinates, units, and radius are read so results stay reproducible

Latitude must lie strictly inside negative ninety to ninety degrees because the isometric latitude uses the tangent of forty-five degrees plus half the geodetic latitude, which is undefined at the poles; longitude must lie between negative one hundred eighty and one hundred eighty inclusive. Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong course length. An optional radius field sets the sphere radius in metres when you need a textbook Earth radius other than the default six million three hundred seventy-one thousand and eight point eight metres. Internally the engine converts degrees to radians, wraps the longitude difference into the principal interval from negative pi to pi, computes the isometric latitude difference as the natural log of the ratio of the two tan of pi-over-four-plus-half-latitude terms, forms q as delta-phi over delta-psi or cos of the start latitude when the track is essentially east-west, multiplies R by the square root of delta-phi squared plus q times delta-lambda squared, and obtains bearing from atan2 of delta-lambda and delta-psi. The preferred fields are lat1 and lon1 for the start point and lat2 and lon2 for the end point, all in decimal degrees, but aliases such as start_lat, end_lon, latitude1, and longitude2 are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. An optional unit field chooses metres, kilometres (the default), statute miles, or nautical miles, with longer aliases such as kilometers and nautical_miles normalised to short tags. Optional precision, with aliases decimals and dp, chooses how many decimal places to expose for distances and bearing, defaulting to six and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing loxodrome formulas yourself.

Where constant-bearing distance fits in navigation study, charts, and software

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with coordinate conversion or geohash tools when you need related geo steps, and with other parse endpoints when you are building a small lab of free, deterministic navigation helpers.

Deterministic navigation fixtures

Generate reproducible distance_m, unit-scaled distance, and bearing_deg values for unit tests, property checks, and CI assertions.

Read the full KIT documentation →