Andoyer–Lambert distance
Along the equator, from longitude 0° to longitude 1°, the Andoyer–Lambert distance on the WGS84 ellipsoid is 111319.491 m. Enter two points in degrees and get the geodesic distance in metres, corrected for the Earth's flattening. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Lat1 deg
- 0
- Lon1 deg
- 0
- Lat2 deg
- 0
- Lon2 deg
- 1
- Decimal places
- 3
- A
- 6,378,137
- F
- 0.0033528107
- Distance m
- 111,319.491
Ellipsoidal Andoyer–Lambert geodesic distance (metres). Search intent: andoyer lambert distance. No network calls or random seeds are required. Failed jobs are not billed.
What the Andoyer–Lambert distance measures
The Earth is not a perfect ball: it is slightly flattened at the poles, and geodesy describes it with an ellipsoid set by two numbers, the semi-major axis and the flattening. The Andoyer–Lambert method is a series formula that takes the distance between two points and corrects it for that flattening, so the result follows the ellipsoid rather than a sphere. By default it uses WGS84, with a semi-major axis of 6378137 m. You enter the latitude and longitude of both points in degrees and get the distance in metres; one degree of longitude along the equator, for example, comes out at 111319.491 m.
When to use it and the mistakes to avoid
It suits checks in spreadsheets, classroom exercises and any task that needs an ellipsoidal distance with the same answer every time, since nothing depends on a connection or on chance. The typical mistakes are simple: swapping latitude and longitude, typing the second point's values into the first point's boxes, or changing the semi-major axis without the matching flattening when you switch to another ellipsoid. Rounding is another trap: if you ask for decimals, the value is rounded only once from the unrounded result, so roundings do not stack up. Invalid entries are rejected before the calculation rather than turning into a misleading distance.
What you can do with it
Teaching
Pinned goldens.
FAQ
Which ellipsoid does the Andoyer–Lambert calculator use?
By default WGS84: a semi-major axis of 6378137 m and its matching flattening. If you work with another ellipsoid, change both values together so the distance fits that model.
In what unit is the distance given, and how is it rounded?
The distance is given in metres. If you ask for decimals, the value is rounded once, half up, from the unrounded result, so rounding errors never pile up.
What does the flattening value mean?
It tells you how much the ellipsoid is squashed at the poles compared with a sphere; a value of zero would describe a perfect sphere. For WGS84 it is a small number, and the formula uses it to correct the distance.
Do I enter the coordinates in degrees or radians?
In decimal degrees, for both the first and the second point. Invalid entries are rejected before any arithmetic is done, instead of producing a misleading distance.
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/andoyer \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"lat1_deg":0,"lon1_deg":0,"lat2_deg":1,"lon2_deg":1}'const res = await fetch("https://api.kit.forhosting.com/geo/andoyer", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"lat1_deg": 0,
"lon1_deg": 0,
"lat2_deg": 1,
"lon2_deg": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geo/andoyer",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"lat1_deg": 0,
"lon1_deg": 0,
"lat2_deg": 1,
"lon2_deg": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geo/andoyer", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"lat1_deg":0,"lon1_deg":0,"lat2_deg":1,"lon2_deg":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"lat1_deg":0,"lon1_deg":0,"lat2_deg":1,"lon2_deg":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geo/andoyer", 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_deg": 0,
"lon1_deg": 0,
"lat2_deg": 1,
"lon2_deg": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geo.andoyer",
"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.
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
The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos.
How it works
Ellipsoidal Andoyer–Lambert geodesic distance (metres). Series formula with flattening f; WGS84 defaults. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos.
Inputs, limits and rounding
Optional decimals use half-up once. Optional output fields are omitted, never null. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Provide required JSON fields with DOM-safe names. Invalid types raise invalid_input. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks,
When to use it
Use when search intent matches. Ellipsoidal Andoyer–Lambert geodesic distance (metres). EN-only delivery; Nitro hydrates locales. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos.
Integration use cases
Quick check
Free widget.
Automation
API same JSON.
Technical questions
Free?
Yes tier A.
Network?
No.
Bad input?
invalid_input.
API?
Yes.
Locales?
EN-only; Nitro hydrates.