Escape energy calculator
The escape energy calculator finds the minimum initial kinetic energy an object needs to escape the gravity of a spherical planet when launched from a specified radius.
Run — free
Enter the object's mass, the planet's mass, and the launch distance from the planet's center, all in SI units. The result is returned in joules using the standard gravitational constant and the ideal two-body model, with no atmosphere, propulsion losses, rotation, or influence from other bodies included.
What escape energy means
Escape energy is the minimum kinetic energy an object must have at its starting point to move indefinitely away from a gravitating body and approach zero speed at an infinite distance. In the ideal model, the initial kinetic energy exactly cancels the magnitude of the object's negative gravitational potential energy. The calculator therefore evaluates E = GMm/r, where G is the gravitational constant, M is the planet mass, m is the escaping mass, and r is the distance between their centers at launch. This is also consistent with applying one-half m times the square of the familiar escape velocity. The result is an energy threshold, not a prediction of fuel consumption or engine performance. A real vehicle must generally supply more energy because it experiences atmospheric drag, gravity losses while thrusting, imperfect propulsion, and operational constraints. The model also treats the planet as spherically symmetric and assumes its mass is overwhelmingly larger than the escaping object's mass, which is appropriate for ordinary spacecraft, payloads, and projectiles near planets or moons.
Choose the three inputs correctly
Provide the escaping object's mass in kilograms, the planet or moon mass in kilograms, and the launch radius in meters. Radius means distance from the body's center, not altitude above its surface. For a surface launch, use the body's mean radius; for a launch already above the surface, add the altitude to the planetary radius. Keeping every input in SI units is essential because the returned value is in joules. The object and planet masses may be zero as mathematical boundary cases, producing zero energy, but negative masses are rejected because they are outside the intended physical model. Radius must be strictly greater than zero. A zero radius would place the object at the singular center of the point-mass formula and require division by zero, so the capability reports an invalid-input error instead of an infinite or misleading answer. Scientific notation is useful for planetary masses, such as 5.972e24 kilograms, and remains a regular finite numeric input. Check the exponent carefully, since escape energy scales directly with each mass.
Interpret the result and its limits
The primary result, kinetic_energy_j, is the ideal minimum energy in joules at the stated radius. It scales linearly with the escaping mass and planet mass: doubling either one doubles the energy. It varies inversely with radius, so beginning twice as far from the planet's center halves the required energy in this simplified model. This relationship makes the calculator useful for comparisons, feasibility checks, classroom work, and independent verification of an escape-velocity calculation. It should not be read as the chemical energy that must be loaded into a rocket. Converting the result into propellant requires a propulsion model, vehicle mass changes, trajectory, staging, efficiency, and losses. Rotation can reduce or increase the launch requirement depending on direction and latitude, while an atmosphere adds drag. Other moons, planets, or a star can also change the relevant gravitational potential. For engineering decisions, use a trajectory simulation with the appropriate bodies and forces. This calculation remains valuable as a transparent baseline: it states exactly what the ideal gravitational energy barrier is before those additional effects are introduced.
What you can do with it
Estimate a spacecraft energy baseline
Find the ideal gravitational energy threshold before adding propulsion efficiency, drag, staging, and trajectory losses.
Compare planets and moons
Hold payload mass constant and compare how body mass and launch radius change the energy needed for escape.
Check physics coursework
Verify a result derived from gravitational potential energy or from one-half mass times escape velocity squared.
FAQ
What formula does the calculator use?
It uses E = GMm/r, the magnitude of gravitational potential energy at the launch radius.
Is radius the planet radius or launch altitude?
Use distance from the planet's center. For a launch above the surface, add altitude to the planet radius.
Why does a zero radius cause an error?
The formula divides by radius. At zero, the ideal point-mass expression is singular and has no finite result.
Does the result include atmospheric drag or rocket efficiency?
No. It is an ideal gravitational energy threshold and excludes drag, propulsion losses, rotation, and trajectory effects.
How much does the API request cost?
The API price is $0.002 per request. The same deterministic calculation can run free in the browser.
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/mech/escape-energy \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"mass_kg":1000,"planet_mass_kg":5.972e+24,"radius_m":6371000}'const res = await fetch("https://api.kit.forhosting.com/mech/escape-energy", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"mass_kg": 1000,
"planet_mass_kg": 5.972e+24,
"radius_m": 6371000
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/mech/escape-energy",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"mass_kg": 1000,
"planet_mass_kg": 5.972e+24,
"radius_m": 6371000
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/mech/escape-energy", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"mass_kg":1000,"planet_mass_kg":5.972e+24,"radius_m":6371000}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"mass_kg":1000,"planet_mass_kg":5.972e+24,"radius_m":6371000}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/mech/escape-energy", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"mass_kg": 1000,
"planet_mass_kg": 5.972e+24,
"radius_m": 6371000
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "mech.escape_energy",
"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. |