ForHosting KIT · Science

Acceleration due to gravity calculator

At 10 km, around a long-haul cruising altitude, gravity is about 0.3 % weaker than the standard 9.80665 m/s² at sea level. Enter an altitude in metres and get the local gravitational acceleration from the inverse-square law. 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
Altitude
10,000
You get
G
9.775937053 m/s²
G0
9.80665
Earth radius
6,371,000
Precision
10

Send an altitude in metres and get back the gravitational acceleration in metres per second squared, computed with the inverse-square law from standard gravity and the mean Earth radius. It is the same formula textbooks teach, packaged as a deterministic call you can drop into a simulation, a lesson plan, or a sanity check — no ephemeris files, no lookup tables, no approximation drift between runs.

Why gravity changes with altitude

Newton's law of universal gravitation says the pull between two masses weakens with the square of the distance between their centres. Standing on the ground you are already one Earth radius from the centre, so climbing a few kilometres barely moves the needle — but the effect is real and measurable.

At cruising altitude of a long-haul flight, around ten kilometres up, gravity is about 0.3 percent weaker than at sea level; at the orbit of the International Space Station, roughly four hundred kilometres up, it is down by nearly nine percent, which is why 'weightlessness' in orbit is really free fall, not the absence of gravity. The acceleration due to gravity calculator applies exactly that relationship: it scales standard surface gravity by the square of the ratio between Earth's radius and your distance from the centre.

Because the formula is a pure function of altitude, the same input always yields the same output, which makes the result safe to cache, compare, and assert against in tests.

How the number is computed

The engine takes your altitude in metres, adds it to the mean Earth radius of 6,371 kilometres to get your distance from the centre of the planet, then divides that radius by the total distance and squares the ratio. Multiplying by standard gravity, 9.80665 metres per second squared, gives the local gravitational acceleration. An altitude of zero returns standard gravity exactly, which is a convenient built-in check.

Where it fits in real work

Physics teachers use it to show students that g is not a universal constant but a field that fades with height. Aerospace and drone software uses it to keep weight and thrust budgets honest at operating altitude. Game and simulation developers use it when a projectile or lander needs plausible physics on a high peak or a balloon platform.

Data pipelines use it as a quick validator: if a sensor claims an altitude, the expected gravity is one call away.

Correct physics at flight altitude

Feed the local g into drone, balloon, or aircraft simulations instead of assuming the sea-level value everywhere.

Teach the inverse-square law

Show students exactly how gravity fades from sea level to orbit with one reproducible formula and no hand-waving.

Sanity-check altitude data

Compare a sensor's reported altitude against the expected gravitational acceleration to catch unit and sign errors early.

Why is a negative altitude rejected?

Because the inverse-square law describes the field outside a spherical Earth.

What unit does the result use?

Metres per second squared (m/s²), the SI unit of acceleration, when the altitude is given in metres.

Does it account for latitude or Earth's rotation?

No. It models a spherical, non-rotating Earth. Centrifugal and ellipsoidal corrections are intentionally out of scope to keep the result a pure function of altitude.

Is the result deterministic?

Yes. There is no network, clock, or randomness involved, and the output is rounded to a fixed precision, so identical inputs always produce identical outputs.

Is there still gravity at the height of the International Space Station?

Yes. Roughly 400 km up, gravity is down by nearly 9 % compared with sea level. The weightlessness astronauts feel in orbit comes from falling continuously around the Earth, not from the absence of gravity.

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/phys/acceleration-due-to-gravity

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/phys/acceleration-due-to-gravity \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"altitude":10000}'
{
  "altitude": 10000
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "phys.acceleration_due_to_gravity",
  "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.

max_abs_altitude1000000000000000
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.

The acceleration due to gravity API answers one clean question: how strong is Earth's pull once you leave the surface?

How the number is computed

The input must be a finite, non-negative number: a negative altitude would mean modelling the interior of the Earth, where the inverse-square law for the exterior no longer applies, so the calculator rejects it with a clear invalid_input error instead of returning a confident-looking but wrong number.

Where it fits in real work

The same code that runs on our edge runs free in your browser on this page, so you can explore values interactively and only pay $0.002 per request when you automate the call. There is no network lookup, no clock, and no randomness involved — the formula, two published constants, and your input are the whole story, which keeps the call fast, cheap, and trivially reproducible in any environment.

What does it cost?

$0.002 per request. It is also free to run in your browser on this page.

Which formula does it use?

The inverse-square law: g = g0 · (R / (R + h))², with standard gravity g0 = 9.80665 m/s² and mean Earth radius R = 6.371e6 m.

Read the full KIT documentation →