ForHosting KIT · Travel & geography

Sea route great-circle distance calculator

From Miami to Bermuda the great circle measures 899.560522 nautical miles, and you leave on a true course of about 60 degrees. Enter two sea positions in decimal degrees for a first-pass passage plan. 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
25.7617
Lng1
-80.1918
Lat2
32.3078
Lng2
-64.7505
You get
Distance nm
899.560522
Distance km
1,665.986087
Initial course deg
60.510586
Central angle deg
14.982573

Ocean passages are planned in nautical miles and degrees true, not in city-street kilometres. When you hold two sea positions as latitude and longitude—harbour approaches, waypoints, AIS fixes, or charted departure and landfall—you need the shortest path on the sphere (the great circle) and the initial course to steer from the first point toward the second. This sea route great-circle distance calculator accepts four decimal-degree coordinates, validates their ranges, applies the haversine central-angle formula on a published mean Earth radius, converts arc length to international nautical miles (exactly 1852 metres per NM), and returns the forward azimuth at departure as a true course in degrees from 0 up to but not including 360. No map tiles, no geocoding network hop, and no random seed—only deterministic spherical navigation arithmetic you can recompute offline.

What great-circle sailing distance and initial course mean

On a sphere, the shortest path between two points is the arc of a great circle—the intersection of the sphere with a plane through the Earth's centre and both positions. Mariners historically plotted that orthodrome on a chart and read off distance in nautical miles, where one international nautical mile is defined as exactly 1852 metres.

This capability evaluates the central angle with the numerically stable haversine formula, multiplies by a conventional mean Earth radius of 6371 kilometres, and converts the resulting arc length into nautical miles using that 1852 m definition. It also returns the same arc in kilometres and the central angle in degrees so you can cross-check against other spherical tools.

The initial course is the forward true azimuth at the departure latitude and longitude: the direction of the great-circle track as you leave the first point, expressed in degrees clockwise from true north in the half-open interval from 0 to 360. That bearing is not a constant rhumb-line course for the whole passage; on long ocean legs the true heading along the great circle changes, which is why traditional practice used intermediate waypoints or a pure rhumb when a constant compass course mattered more than absolute shortest distance.

Here you get the classic pair of numbers used in first-pass passage planning: how many nautical miles on the great circle, and which way true to start. The model is spherical, not an ellipsoidal geodesic such as Vincenty or Karney on WGS84, so results can differ by a small fraction of a percent from survey-grade libraries—acceptable for voyage estimates, education, and automation filters, not a substitute for official charts or type-approved ECDIS routing.

Who plans passages with great circles

Yacht passage planners, charter fleets, and coastal operators use great-circle distance in nautical miles to size fuel, watches, and weather windows before investing in full weather-routing software. Shipping analytics and AIS enrichment jobs need a cheap, auditable NM column next to every origin–destination pair without spinning up a commercial maps billing stack. Maritime training platforms and exam prep tools need a deterministic oracle that returns both distance and initial true course so students can check orthodrome worksheets against a published radius and conversion.

Failed validation does not consume balance. For constant-bearing rhumb tracks, multi-stop optimisers, or tidal streams, keep specialised tools—this capability is the orthodrome primitive: validate ranges, measure the great circle in NM, report the departure course, done.

Yacht and commercial passage planning

Enter departure and landfall lat/lng to get great-circle distance in nautical miles and the initial true course for first-pass fuel and watch planning.

Maritime training and exam checks

Let students verify orthodrome distance and departure bearing against a fixed spherical model with published radius and 1852 m per NM.

How is sea great-circle distance calculated?

The haversine formula yields the central angle between the two lat/lng positions on a sphere of radius 6371 km; arc length is converted to international nautical miles using exactly 1852 metres per NM.

Which coordinate ranges are accepted?

Latitude lat1/lat2 must be between −90 and 90 inclusive; longitude lng1/lng2 must be between −180 and 180 inclusive.

Is this the same as rhumb-line distance?

No. This capability computes the great-circle (orthodrome) distance and initial course. A rhumb line holds a constant bearing and is generally longer on mid-latitude ocean legs.

Does the initial course stay the same for the whole passage?

No. It is the direction you steer as you leave the first point; on long ocean legs the true heading along a great circle keeps changing. Use intermediate waypoints, or a rhumb line if a constant course matters more than distance.

How accurate is the spherical model?

It treats the Earth as a sphere with a mean radius of 6371 km, so results can differ from survey-grade ellipsoid tools by a small fraction of a percent. That is fine for voyage estimates, not a substitute for official charts.

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/travel/sea-great-circle

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/travel/sea-great-circle \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lat1":25.7617,"lng1":-80.1918,"lat2":32.3078,"lng2":-64.7505}'
{
  "lat1": 25.7617,
  "lng1": -80.1918,
  "lat2": 32.3078,
  "lng2": -64.7505
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "travel.sea_great_circle",
  "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.

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.

Input contract, validation, and how to read the response

Latitude must lie in the closed interval from −90 to 90; longitude must lie in −180 to 180 inclusive. Antipodal and near-antipodal pairs are supported; internal clamping keeps floating-point edge cases from producing NaN in the haversine step. POST a JSON body with four required finite numbers: lat1 and lng1 for the departure sea position, lat2 and lng2 for the destination, all in decimal degrees. Values outside those ranges, missing fields, empty strings, booleans, or non-finite numbers fail with invalid_input and are not billed. A common client bug is swapping latitude and longitude when pasting from a GIS habit that stores x as longitude first: the request may still pass range checks while describing a completely wrong ocean, so always confirm lat is north–south and lng is east–west. Identical positions correctly return zero distance_nm and zero distance_km, with initial_course_deg set to 0 by convention. On success the body echoes the four coordinates, distance_nm and distance_km rounded to six decimal places for stable goldens, initial_course_deg as the true course at departure, central_angle_deg for the sphere angle, earth_radius_nm documenting the NM radius derived from 6371 km and 1852 m, and a short formula string restating the model. Pricing is a flat $0.002 per successful API item; the tier-A in-browser path lets you try Miami–Bermuda or any custom waypoints without wiring a full pipeline first. Pair this endpoint with a geocoder only when you start from place names; once you already have charted or GPS lat/lng, avoid re-geocoding just to measure the orthodrome.

AIS and fleet OD enrichment

Add distance_nm and initial_course_deg columns to origin–destination voyage exports without a commercial maps API or GIS server.

What is initial_course_deg?

It is the forward true azimuth at the departure point along the great circle, in degrees clockwise from true north, normalised to the range [0, 360). It is not a constant rhumb-line heading for the whole passage.

How much does the sea route great-circle calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →