Gravitational Potential Energy Calculator – U = −GMm/r
Use this free Gravitational Potential Energy Calculator for the true, large-distance formula U = −GMm/r — the version needed for satellites and spacecraft, where the simple mgh approximation no longer works.
The school formula U = mgh quietly assumes gravity is constant — a fair bargain near the ground, where a few kilometres of height change g by a fraction of a percent. But satellites live thousands of kilometres up, where gravity has faded substantially, and spacecraft bound for the Moon or Mars climb out of Earth's grip almost entirely. For them the honest formula is the one Newton gives: U = −GMm/r, where r is the distance from the planet's centre. It works at the surface, in orbit, and halfway to the Moon with the same unvarying accuracy, and mgh emerges from it as the small-height approximation.
The minus sign is the first thing to understand, because it confuses everyone. Potential energy needs a reference point — a place where U is declared to be zero — and for gravity the universal choice is infinity: an object infinitely far away, feeling no pull at all, has U = 0. Every real object sits closer than infinity, inside gravity's reach, so its potential energy is negative. The negativity is not a problem to fix; it is information. It says the object is bound: to free it, you must pay in at least |U| joules of energy, climbing out of what physicists picture as an energy well whose rim is at zero.
This calculator evaluates U for an object of mass m at any altitude above Earth, the Moon, Mars or Jupiter — or around a custom body of your own mass. The answers run to tens of billions of joules for ordinary satellites, which is why results are shown in scientific notation. Read alongside our Satellite Energy Calculator, which adds the kinetic half of the story, this page completes the energy bookkeeping of anything that orbits or escapes.
Formula
Gravitational potential energy U = −GMm/r, with G = 6.674 × 10⁻¹¹ N·m²/kg² and r measured from the centre of the body (r = radius + altitude). The change in potential energy between two distances — the quantity engines actually pay for — is ΔU = GMm × (1/r₁ − 1/r₂). Close to the surface, where the height h is tiny beside the radius, this reduces to the school formula ΔU ≈ mgh with g = GM/R²; Example 6 below measures exactly how good that approximation is. The zero of energy is set at infinity, which is why U is always negative for a bound object — you must add energy to free it.
| Symbol | Meaning | Units |
|---|---|---|
| U | gravitational potential energy (zero at infinity) | joules (J) |
| G | universal gravitational constant, 6.674 × 10⁻¹¹ | N·m²/kg² |
| M | mass of the planet or central body | kilograms (kg) |
| m | mass of the object | kilograms (kg) |
| r | distance from the centre of M: radius + altitude | metres (m) |
| ΔU | energy needed to move between two distances | joules (J) |
The energy well: reading U as a depth
Picture the formula as a landscape. At the planet's surface you stand at the bottom of a well whose depth, per kilogram, is GM/R — about 62.6 million joules per kilogram for Earth. Climbing the well's wall, each metre of height buys you less additional depth than the last, because the wall flattens as gravity weakens: the well is steep near the planet and asymptotically level far away, reaching the rim — U = 0 — only at infinity. This shape explains a fact that surprises many people: half of the entire energy needed to escape Earth forever is spent in roughly the first 6,371 km of the climb, one Earth radius. The remaining infinity of distance costs only the other half.
It also explains why "escape velocity" and this page are secretly the same topic. To escape, an object's kinetic energy must at least cancel its negative potential energy: ½mv² = GMm/r, giving v = √(2GM/r) — the escape velocity our Planet Escape Velocity Table computes for eight worlds. Potential energy is the debt; kinetic energy is the cash; escape is the moment the books balance to zero.
How to use
- Pick a central body preset (Earth, Moon, Mars or Jupiter) or choose Custom and type its mass in kilograms — scientific notation like 5.972e24 works. For a custom body, the altitude box is read as the distance from its centre, in kilometres.
- Enter the object's mass m in kilograms.
- Enter the altitude above the surface in kilometres (0 for an object resting on the surface).
- Click "Calculate Potential Energy" to see the distance from the centre and U in joules, in scientific notation.
- To find the energy needed to move between two heights, run the calculator twice and subtract: the difference of the two U values is the minimum energy the move requires.
Worked examples
Example 1 — a satellite above Earth. A 1,000 kg satellite orbits 400 km above Earth, so r = 6,371 + 400 = 6,771 km = 6.771 × 10⁶ m.
U = −GMm/r = −(6.674 × 10⁻¹¹ × 5.972 × 10²⁴ × 1,000) / 6.771 × 10⁶ ≈ −5.886 × 10¹⁰ J. To escape Earth's gravity completely from there, the satellite would need at least +5.886 × 10¹⁰ J of additional energy.
Example 2 — the same satellite on the launch pad. At the surface, r = 6.371 × 10⁶ m:
U ≈ −6.256 × 10¹⁰ J. Raising it to 400 km therefore costs ΔU = 6.256 × 10¹⁰ − 5.886 × 10¹⁰ ≈ 3.70 × 10⁹ J of pure potential energy — before a single joule of orbital kinetic energy is bought. Rockets pay both bills.
Example 3 — standing on the Moon. For 1 kg on the Moon's surface (M = 7.348 × 10²² kg, r = 1.7374 × 10⁶ m):
U ≈ −2.82 × 10⁶ J — about 22 times shallower per kilogram than Earth's well, which is why the modest Lunar Module could lift off with a small engine while Earth launches need monsters.
Example 4 — a probe out at Jupiter's distance from the Sun. A 500 kg probe at r = 5.203 AU = 7.783 × 10¹¹ m from the Sun (M = 1.989 × 10³⁰ kg):
U ≈ −8.53 × 10¹⁰ J. Even billions of kilometres out, the Sun's well is deep — a probe there is still firmly bound to the solar system.
Example 5 — a GPS satellite. 1,000 kg at r = 26,571 km from Earth's centre:
U ≈ −1.500 × 10¹⁰ J — almost exactly a quarter of the surface value per kilogram, since the radius is almost exactly four times larger and U fades as 1/r, not 1/r².
Example 6 — how wrong is mgh, really? Lift 100 kg by 10 km near Earth's surface. School formula: mgh = 100 × 9.82 × 10,000 = 9,820,000 J. Exact: ΔU = GMm(1/R − 1/(R+h)) = 9,804,143 J. The approximation overshoots by just 0.16% — gravity weakens so gently near the ground that mgh stays superb for anything that does not leave the lower atmosphere, and quietly fails only when h becomes a respectable fraction of R.
Potential energy in real life
Rocket sizing. The ΔU between the launch pad and a target orbit is a hard floor on a rocket's energy budget — no engine efficiency can dodge it. Mission designers read it straight off this formula before choosing propellant mass.
Escape and capture. A arriving spacecraft is captured into orbit only if it can shed enough energy to make its total negative; aerobraking at Mars and Venus works by letting the atmosphere burn off exactly the excess that this page's bookkeeping identifies.
Hydroelectric storage, honestly scaled. Pumped-storage plants exploit ΔU ≈ mgh: a cubic metre of water raised 500 m banks about 4.9 × 10⁶ J. Compare Earth's well depth of 62.6 MJ per kilogram and you see why chemical and orbital energies dwarf anything a reservoir can hold per kilogram.
Tides. The Moon's orbital potential and kinetic energies trade against Earth's rotation: tidal friction transfers energy, the Moon's orbit gains ΔU as it recedes 3.8 cm per year, and Earth's day lengthens to pay for it — the well picture, running in slow motion.
Gravitational assists. A slingshot around Jupiter does not change a probe's potential energy relative to Jupiter over the whole encounter — it enters and leaves the well at the same depth — but it can leave in a new direction, converting the geometry into heliocentric speed. The energy accounts, kept in U, still balance.
Black hole bookkeeping. The same −GMm/r logic, pushed to extreme M and small r, is the starting point for the energetics of accretion discs — matter falling deep into a well converts a measurable fraction of its rest mass into light, which is why quasars outshine galaxies.
From mgh to −GMm/r: one formula, two costumes
The two formulas are not rivals; one is the other's local accent. Write the exact change for a small height h: ΔU = GMm(1/R − 1/(R+h)) = GMm × h / (R(R+h)). When h is negligible beside R, the denominator is just R² and the expression collapses to (GM/R²) × m × h = mgh. The approximation's error grows like h/R: at h = 10 km it is 0.16% (Example 6), at the Space Station's 400 km it is several percent, and by GEO the school formula is simply unusable. A good rule: if your altitude is less than 1% of the planet's radius, mgh is fine to three figures; beyond that, this page's formula earns its keep.
Comparing wells: how deep is each world's gravity?
The fairest way to compare planets is the depth of the well per kilogram, GM/R — the energy needed to lift one kilogram from the surface to infinity. Earth's well is 62.56 MJ deep per kilogram. The Moon's is only 2.82 MJ/kg — twenty-two times shallower, which is why lunar ascent vehicles can be frail and why the Moon could never hold an atmosphere. Mars's well is 12.64 MJ/kg, a fifth of Earth's: deep enough to complicate sample return, shallow enough to keep it feasible. Jupiter's well plunges to about 1,812 MJ/kg per kilogram — twenty-nine Earth wells stacked — a depth no chemical rocket will ever climb from the cloud tops. And the Sun's well, at roughly 190,800 MJ/kg, is the one the whole solar system sits inside. Every mission ever flown can be described as buying its way up some fraction of one of these wells; this calculator measures the depth at any height, for any of them.
Quick reference: potential energy per kilogram around Earth
| Where | Distance from centre | U per kg |
|---|---|---|
| Earth's surface | 6,371 km | −62.56 MJ |
| ISS orbit (400 km) | 6,771 km | −58.86 MJ |
| 2,000 km altitude | 8,371 km | −47.61 MJ |
| GPS orbit | 26,571 km | −15.00 MJ |
| Geostationary orbit | 42,241 km | −9.44 MJ |
| Moon's distance | 384,400 km | −1.04 MJ |
| Infinity | ∞ | 0 (by definition) |
For other worlds the surface depth per kilogram is: Moon −2.82 MJ, Mars −12.64 MJ, Jupiter −1,812 MJ. Jupiter's well is so deep that falling into it from far away releases more energy per kilogram than burning the same kilogram of almost any fuel.
From potential to speed: the vis-viva bridge
Potential energy and motion meet in the vis-viva equation, v² = GM(2/r − 1/a), which prices the speed of any object at any point of an elliptical orbit from the orbit's semi-major axis alone. Test it against this page's numbers: a satellite on an ellipse with a = 10,000 km, passing through the ISS's altitude (r = 6,771 km), must be moving at v = √(GM(2/r − 1/a)) ≈ 8,824 m/s — faster than the circular speed there (7,672 m/s), because it is falling through that altitude on its way to a lower perigee, spending potential energy the circular satellite keeps. Every comet's perihelion blaze and every transfer orbit's arrival speed is this trade, computed the same way: U falls, speed rises, and the sum — the total energy of our Satellite Energy Calculator — never changes.
Common mistakes
- Dropping the minus sign. U = −GMm/r is negative by construction — zero is at infinity. Reporting a positive value usually means the sign was "tidied away"; the sign is the physics, since it marks the object as bound.
- Using altitude in place of r. The formula needs distance from the centre. At 400 km altitude the correct r is 6.771 × 10⁶ m; using 400 km inflates |U| seventeen-fold.
- Expecting U to fade like gravity does. g falls as 1/r², but U falls only as 1/r. Doubling your distance quarters gravity yet merely halves the depth of the well — the difference between a force and the energy it accumulates.
- Treating U itself as the energy to escape. The escape requirement from a given orbit is the total energy deficit, KE + U, not U alone; a satellite in orbit already owns kinetic energy that pays half the bill (see the Satellite Energy Calculator).
- Stretching mgh to orbital heights. mgh assumes constant g. At 400 km it overstates ΔU noticeably and at GEO it is hopeless; the exact formula costs nothing extra to use.
FAQ
Why is gravitational potential energy negative?
Because we define U = 0 at infinite distance. Gravity pulls objects together, so a bound object sits in an "energy well" below zero — energy must be supplied to lift it out.
When can I just use U = mgh instead?
Near a planet's surface, where h is tiny compared with the radius, mgh is an excellent approximation. For orbits thousands of kilometres up, use −GMm/r.
How does U relate to a satellite's total energy?
For a circular orbit the kinetic energy is +GMm/2r, so the total energy is −GMm/2r — exactly half the potential energy. See our Satellite Energy Calculator.
What does U = 0 actually mean physically?
An object with total energy zero is exactly on the boundary: given its potential energy of zero at infinity, it is just barely unbound — it could coast away from the planet forever, arriving at infinity with no speed left. Anything below zero is trapped; anything above is leaving for good.
Why choose infinity as the zero? Isn't that arbitrary?
It is a convention, but a forced one: gravity's reach is infinite, so infinity is the only place where every mass agrees the interaction vanishes. Only differences ΔU are measurable, and those are the same whatever zero you choose — the infinity convention simply makes the single-value formula possible.
How much energy does it take to lift 1 kg from Earth's surface to the ISS?
ΔU per kilogram between the surface and 400 km is 62.56 − 58.86 ≈ 3.70 MJ — about one kilowatt-hour (3.6 MJ). The far larger cost of reaching orbit is the kinetic energy, roughly 29 MJ per kilogram, which is a statement about speed, not height.
Does a heavier planet always mean a deeper well?
Not by mass alone — depth is GM/R, mass divided by radius. Jupiter's well per kilogram (−1,812 MJ) dwarfs Earth's because its mass grew 318-fold while its radius grew only 11-fold. A diffuse giant could in principle have a shallower surface well than a compact smaller world.
Can potential energy be positive?
With the infinity convention, no — gravity is purely attractive, so −GMm/r is negative at every finite distance. Positive total energy is possible (an unbound, escaping object), but that comes from its kinetic energy exceeding |U|, never from U itself.
What is the potential energy at the centre of the Earth?
The formula −GMm/r describes a point mass or the field outside a sphere; inside the Earth you must count only the mass interior to your radius, and U bottoms out at 1.5 times the surface value, about −93.8 MJ per kilogram, at the centre. Nobody is drilling there to check.
How does this connect to escape velocity?
Escape means reaching infinity with nothing left over: ½mv² + U = 0. Solving gives v = √(2GM/r) — so this page's U, divided by mass and doubled, is the square of the escape speed at any point. Our Planet Escape Velocity Table runs that calculation for eight worlds.