ForHosting KIT · Travel & geography

Azimuth calculator

From London to Paris the initial bearing is 148.115617°, measured clockwise from true north. Enter the coordinates of the start and the destination in decimal degrees and get the direction of the great-circle route. 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
48.8566
Lon2
2.3522
You get
Azimuth degrees
148.115617

This azimuth calculator finds the initial great-circle bearing from one geographic point to another. Enter the latitude and longitude of the starting point and the destination, and it returns an angle in degrees clockwise from true north. A result near zero points north, 90 points east, 180 points south, and 270 points west. The calculation is deterministic, runs without a network request, validates every coordinate, and is suitable for navigation checks, geographic analysis, mapping tools, and repeatable software workflows.

Enter the two points in the correct order

Provide the starting point as lat1 and lon1, then provide the destination as lat2 and lon2. All four values use decimal degrees. Latitude measures position north or south of the equator and must stay between -90 and 90.

Longitude measures position east or west of the prime meridian and must stay between -180 and 180. Negative latitudes indicate the Southern Hemisphere, while negative longitudes indicate positions west of the prime meridian. The order matters because an azimuth describes a direction of travel: the bearing from London to Paris is not simply interchangeable with the bearing from Paris to London.

Use the exact coordinates from the same coordinate reference system, normally WGS 84 geographic coordinates. Do not swap latitude and longitude, and do not submit degrees-minutes-seconds notation as text. Convert such notation to signed decimal degrees first.

The calculator rejects missing values, non-finite numbers, out-of-range coordinates, and identical points, for which no travel direction exists.

Understand how the azimuth is calculated

The result is the initial bearing of the great-circle path from the first point to the second. Internally, the calculator converts each coordinate from degrees to radians, computes the longitude difference, and applies the standard spherical forward-azimuth formula with an atan2 operation. Using atan2 preserves the correct quadrant, which is essential because a simple inverse tangent cannot reliably distinguish northeast from southwest.

Angles increase clockwise from true north: 0 degrees is north, 90 degrees is east, 180 degrees is south, and 270 degrees is west. This is a true-north geographic bearing, not a magnetic compass heading, so it does not include magnetic declination. It is also an initial bearing.

On most long great-circle routes, the direction changes as the path progresses even though the route remains the shortest path over the spherical model.

Use the result with appropriate geographic precision

Treat the returned value as a clear, reproducible direction for geographic calculations rather than a complete navigation instruction. The formula models Earth as a sphere, which is accurate enough for many mapping, educational, routing-preview, and data-quality tasks. Surveying, aviation operations, marine navigation, and safety-critical guidance may require an ellipsoidal geodesic model, local regulations, current charts, magnetic variation, instrument corrections, and professional judgment.

Coordinate precision also limits useful bearing precision: rounded input coordinates can shift the angle, especially when points are close together or near a pole. Antimeridian crossings are handled naturally because the trigonometric formula works with the longitude difference, so a route near 180 degrees east or west does not need a special user option. Store the numeric result as degrees, preserve the original point order in your records, and label it as an initial true bearing when sharing it.

Check a route direction

Calculate the initial true bearing from a departure coordinate to a destination before displaying a route arrow or directional summary.

Validate geographic datasets

Compare a recorded heading with the bearing implied by consecutive coordinate pairs and flag large discrepancies for review.

Build mapping features

Generate deterministic azimuth values for map annotations, directional labels, educational tools, or location-based application tests.

What direction does zero degrees represent?

Zero degrees represents true north. Angles increase clockwise, so east is 90 degrees, south is 180 degrees, and west is 270 degrees.

Is this a magnetic compass bearing?

No. It is referenced to true north and does not apply local magnetic declination or compass corrections.

Why does reversing the points change the result?

An azimuth is directional, and great-circle routes generally do not have reverse initial bearings that differ by exactly 180 degrees.

What coordinate ranges are accepted?

Each latitude must be from -90 through 90, and each longitude must be from -180 through 180. All values must be finite numbers.

Does the bearing stay the same for the whole journey?

No. The result is the initial bearing of the great-circle path; on most long routes the direction changes as you travel, even though the path remains the shortest one over the sphere.

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/azimuth

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/azimuth \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lat1":51.5074,"lon1":-0.1278,"lat2":48.8566,"lon2":2.3522}'
{
  "lat1": 51.5074,
  "lon1": -0.1278,
  "lat2": 48.8566,
  "lon2": 2.3522
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geo.azimuth",
  "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.

Use the result with appropriate geographic precision

Browser use is available for interactive calculations, while an API request costs $0.002 and supports repeatable automation without network-dependent data sources inside the calculation itself.

What happens if both points are identical?

The request returns an invalid-input error because a point has no defined direction toward itself.

What does an API request cost?

Each API request costs $0.002. The same deterministic calculation can also run in the browser.

Read the full KIT documentation →