Rhumb line bearing calculator
Get the one compass course to hold between two points along a rhumb line: from 51.127, 1.338 to 50.964, 1.853 it is 116.72186°, or ESE. It is the course that looks straight on a Mercator chart. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Lat1
- 51.127
- Lon1
- 1.338
- Lat2
- 50.964
- Lon2
- 1.853
- Bearing deg
- 116.72186
- Bearing rad
- 2.0371807626
- Compass
- ESE
A rhumb-line bearing calculator answers a navigation question that the great-circle initial azimuth does not: what single constant compass course takes you from one latitude–longitude point to another along a loxodrome? Mariners, pilots of constant-heading segments, GIS educators, and developers writing route tests all need that angle without opening a full charting suite. Enter start and end latitude and longitude in decimal degrees; the tool returns the rhumb bearing in degrees on the half-open interval from zero inclusive to three hundred sixty exclusive, a sixteen-point compass label, the closed-form formula used, antimeridian-normalized delta-lambda and isometric-latitude delta-psi in the step list, and a short English message.
What a rhumb-line bearing is and how it differs from great-circle course
A rhumb line, also called a loxodrome, is a path of constant bearing on the sphere: if you hold a fixed compass heading, you follow a rhumb line, not a great-circle arc. On a Mercator chart rhumb lines appear as straight segments, which is why traditional navigation tables and many route-planning tools still quote constant-course bearings even when the shortest-distance path is the orthodrome.
Algebraically the course theta satisfies atan two of delta-lambda over delta-psi, where delta-psi is the difference of isometric latitudes: the natural log of the ratio of tan of pi over four plus phi two over two to tan of pi over four plus phi one over two. Delta-lambda is the longitude difference folded into the open-closed interval from minus pi to plus pi so that the shorter line across the antimeridian is chosen.
When both points share the same parallel, delta-psi is zero and the course collapses to due east or due west from the sign of delta-lambda. Poles make isometric latitude infinite, so latitudes at or extremely near plus or minus ninety degrees are rejected rather than returning a non-finite angle. None of this is the initial great-circle azimuth: that quantity changes continuously along the orthodrome and uses a different spherical formula.
Prefer this capability when you need a single constant heading between two WGS84 points; prefer a great-circle bearing tool when you need the shortest-path initial track.
What you can do with it
Constant-heading leg planning
Mariners and UAS operators enter waypoint pairs and read the single compass course to hold between them without opening a full ECDIS or flight planner.
GIS education worksheets
Teachers contrast rhumb vs great-circle courses on the same two cities and show students why Mercator charts make constant headings look straight.
FAQ
What is a rhumb-line bearing?
It is the constant compass course (loxodrome) from one lat/lon point to another. Unlike a great-circle initial azimuth, the heading does not change along the path.
What coordinate ranges are accepted?
Latitude must be between -90 and 90 inclusive, longitude between -180 and 180 inclusive. True poles are also rejected because isometric latitude is infinite there.
Is this the same as great-circle bearing?
No. Great-circle (orthodromic) bearing is the initial track of the shortest path and changes along the route. This tool returns the constant rhumb course only.
Is the rhumb line bearing calculator free?
The browser tool is free and runs locally.
What course do I get if both points are on the same parallel?
Due east or due west, depending on which way the longitude changes. On a shared parallel the north-south part of the calculation is zero, so the course runs exactly along that line of latitude.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/geo/rhumb-bearing \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"lat1":51.127,"lon1":1.338,"lat2":50.964,"lon2":1.853}'const res = await fetch("https://api.kit.forhosting.com/geo/rhumb-bearing", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"lat1": 51.127,
"lon1": 1.338,
"lat2": 50.964,
"lon2": 1.853
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geo/rhumb-bearing",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"lat1": 51.127,
"lon1": 1.338,
"lat2": 50.964,
"lon2": 1.853
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geo/rhumb-bearing", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"lat1":51.127,"lon1":1.338,"lat2":50.964,"lon2":1.853}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"lat1":51.127,"lon1":1.338,"lat2":50.964,"lon2":1.853}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geo/rhumb-bearing", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"lat1": 51.127,
"lon1": 1.338,
"lat2": 50.964,
"lon2": 1.853
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geo.rhumb_bearing",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
lat_min | -90 |
lat_max | 90 |
lon_min | -180 |
lon_max | 180 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Coordinates outside the valid latitude range of minus ninety to plus ninety or the longitude range of minus one hundred eighty to plus one hundred eighty produce a clear invalid_input error and are never charged.
What a rhumb-line bearing is and how it differs from great-circle course
When start and end coincide, the geometric bearing is undefined; this API conventionally reports zero degrees and states that fact in the message field so automated tests stay deterministic.
How to call the API and what comes back
Latitudes at the geographic poles are also rejected because the isometric-latitude formula is not finite there. Send a JSON body with four required finite numbers: lat1 (aliases start_lat, latitude1, from_lat), lon1 (aliases start_lon, longitude1, from_lon, lng1), lat2 (aliases end_lat, latitude2, to_lat), and lon2 (aliases end_lon, longitude2, to_lon, lng2). Latitude must lie in the closed interval from minus ninety to plus ninety degrees and longitude in the closed interval from minus one hundred eighty to plus one hundred eighty degrees; any value outside those ranges returns invalid_input with an explicit outside-its-valid-range message. On success the response echoes rounded lat1, lon1, lat2, and lon2; sets bearing_deg to the constant course in degrees on zero inclusive through three hundred sixty exclusive; sets bearing_rad to the same angle in radians; sets compass to a sixteen-point label such as N, NE, or WSW; sets formula to the atan2 and delta-psi expression; sets units for degrees and radians; sets message to a short English summary; and sets steps to an ordered array of substitution lines you can assert in tests. Failed validation—missing fields, non-finite numbers, out-of-range coordinates, or polar latitudes—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.
Practical tips, limits, and related searches
Prefer this capability when you already have two points and only need the constant heading; if your source is a great-circle flight plan, convert or re-sample with an orthodromic tool instead. Keep both latitudes strictly inside the open polar band if you plan long north–south legs near the high latitudes; the API already rejects true poles, but values within a few microdegrees of ninety can still stress tan of pi over four plus phi over two in floating point on other systems. Prefer sending numeric JSON rather than pre-formatted strings when you control the client; string numbers are accepted only when they match a strict finite numeric pattern. When teaching, pair examples: a classic Dover-area leg around fifty-one point one two seven north, one point three three eight east to fifty point nine six four north, one point eight five three east yields a southeast-ish constant course; a pure east leg along a parallel yields ninety degrees; a pure south leg along a meridian yields one hundred eighty degrees; and latitude ninety-one or longitude two hundred demonstrates the hard invalid_input path. This landing targets people searching for a rhumb line bearing calculator, loxodrome constant course, or constant compass heading between two coordinates; it is not a rhumb-distance calculator, not a destination-from-course tool, and not an ellipsoidal geodesic solver. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately send out-of-range longitudes. Round-trip checks are easy: recompute delta-psi and atan2 by hand for a short east–west or north–south leg and confirm that bearing_deg matches within the same six-decimal rounding, and confirm that swapping start and end rotates the course by approximately one hundred eighty degrees on a simple meridional segment.
Integration use cases
Unit tests for navigation libraries
Generate known-good rhumb bearings and deliberate out-of-range rejections for coding kata expected values against movable-type style formulas.
Technical questions
What if start and end are the same point?
The geometric bearing is undefined. The API conventionally returns bearing_deg 0 and states that in the message field for stable tests.