Gravitational Potential Energy Calculator
Last updated: 5 August 2026
Reviewed by Gavin Meiring, Lead research and primary author · Doctoral Candidate (Corporate Governance) · Research and drafting assisted by AI
Compute the gravitational potential energy of an object in a gravitational field. Switch between the uniform-field approximation PE = m · g · h valid near a planetary surface and the inverse-square law U = -G · M · m / r valid anywhere in space. Solve for any single variable given the other three.
Gravitational Potential Energy Calculator
A gravitational potential energy calculator is a tool that determines the energy stored in an object by virtue of its position in a gravitational field. The calculator supports two equivalent formulations: the uniform-field approximation PE = m · g · h, valid near the surface of a planet or moon, and the inverse-square-law form U = -G · M · m / r, valid anywhere in space. The first is what introductory physics students use to size hydroelectric dams and roller coasters; the second is what orbital mechanics uses to compute the energy of satellites, moons, and planets. Both express the same physical idea, that lifting a mass against gravity stores energy that can be recovered when the mass falls, but the second is mathematically correct at large distances where the first breaks down.
This calculator lets you solve for any single variable given the others. Pick the form, enter the three known values, and the calculator returns the fourth along with related quantities such as the equivalent energy in food calories, kilowatt-hours, or, for the universal form, the circular-orbit speed at that radius. Surface gravity presets for Earth, Moon, Mars, Mercury, Venus, Jupiter, and Saturn and central-body mass presets for Earth, Moon, Mars, Sun, Jupiter, and Saturn make quick estimates one click away.
How to Use the Gravitational Potential Energy Calculator
- Pick a mode. Use "near-surface" for everyday problems within a few kilometres of a planetary surface where g is roughly constant. Use "universal" for satellites, interplanetary travel, or any problem where the distance from the central body is comparable to its radius.
- Pick a variable to solve for. In the near-surface mode you can solve for PE, mass, gravity, or height. In the universal mode you can solve for U, the central-body mass M, the test mass m, or the distance r.
- Enter the other values. Masses in kilograms, heights and distances in metres, gravity in m/s², G in N·m²/kg². The CODATA 2018 value G = 6.674 × 10⁻¹¹ is pre-filled; change it only if your problem uses a different convention.
- Click Calculate. The result panel shows the solved variable, the formula applied, and the other quantities you entered. near-surface mode the panel also shows the equivalent in kilocalories and kilowatt-hours. universal mode it also shows the circular-orbit speed at that radius.
- Use presets for speed. Surface-gravity chips load standard g values for the planets. Central-body chips load both the mass and a representative surface radius (the radius of the body itself). Height chips load common everyday heights.
The Formula
Near-surface form
Near a planetary surface the gravitational field is approximately uniform, and the potential energy at a height h above a chosen reference is
PE = m · g · h
where
- PE is the gravitational potential energy in joules (J)
- m is the mass of the object in kilograms (kg)
- g is the local gravitational acceleration in metres per second squared (m/s²)
- h is the height above the chosen reference in metres (m)
Rearranged:
- m = PE / (g · h)
- g = PE / (m · h)
- h = PE / (m · g)
Universal form
At any distance from a spherically symmetric body of mass M, the gravitational potential energy of a test mass m at a distance r from the body's centre is
U = -G · M · m / r
where
- G is the gravitational constant, 6.674 × 10⁻¹¹ N·m²/kg² (CODATA 2018)
- M is the mass of the central body in kilograms
- m is the mass of the test object in kilograms
- r is the distance between their centres of mass in metres
- The negative sign indicates that U is defined to be zero at infinity and becomes more negative as the objects approach one another
Rearranged:
- M = -U · r / (G · m)
- m = -U · r / (G · M)
- r = -G · M · m / U
The universal form is the more general expression; the near-surface form is an approximation that holds when h is much smaller than the radius of the central body. For Earth (radius ≈ 6,371 km) the near-surface formula is accurate to within a few percent for heights up to roughly 100 km.
Worked Examples
Example 1, A book on a shelf
A 2 kg book is lifted onto a 2 m shelf. How much gravitational PE does it gain, assuming it started on the floor?
- m = 2 kg
- g = 9.81 m/s²
- h = 2 m
PE = 2 × 9.81 × 2 = 39.24 J
Dropping the book converts that 39.24 J into kinetic energy at impact. The impact speed is √(2 × 9.81 × 2) ≈ 6.26 m/s. Painful if it lands on your toe but far below the energies that cause injury.
Example 2, A baseball from a skyscraper
A 0.145 kg baseball is dropped from a 200 m building. What is its PE at the top, and how fast is it moving at the bottom (ignoring air resistance)?
PE = 0.145 × 9.81 × 200 = 284.49 J
At impact, all of that has converted to kinetic energy, so
v = √(2 × g × h) = √(2 × 9.81 × 200) ≈ 62.6 m/s (≈ 225 km/h)
A baseball at that speed is genuinely dangerous; this is why dropped-object safety is a real concern on construction sites.
Example 3, Hydroelectric reservoir head
A 1 kg mass of water held 100 m above a turbine. How much energy does it release when it falls?
PE = 1 × 9.81 × 100 = 981 J
A real reservoir holding a million cubic metres of water (a billion kg) at a 100 m head stores
PE = 1 × 10⁹ × 9.81 × 100 = 9.81 × 10¹¹ J = 272,500 kWh
With 90% turbine efficiency that produces roughly 245,000 kWh of electricity, enough to power about 8,000 average South African households for a day.
Example 4, Roller-coaster lift hill
A 1,200 kg roller-coaster train is hauled to the top of a 40 m lift hill. How much PE does it store, and how fast is it moving at the bottom of the first drop (ignoring friction)?
PE = 1,200 × 9.81 × 40 = 470,880 J ≈ 471 kJ
v at bottom = √(2 × 9.81 × 40) ≈ 28 m/s ≈ 101 km/h
A chain-lift motor rated at roughly 500 kW would refill that PE in about a second; the train then bleeds that energy back out as it climbs subsequent hills and finally brakes to a stop at the station.
Example 5, Earth-Moon gravitational PE (universal form)
The Moon has mass m = 7.342 × 10²² kg and orbits Earth (M = 5.972 × 10²⁴ kg) at an average centre-to-centre distance r = 3.844 × 10⁸ m.
U = -(6.674 × 10⁻¹¹) × (5.972 × 10²⁴) × (7.342 × 10²²) / (3.844 × 10⁸) ≈ -7.61 × 10²⁸ J
This enormous negative number is the binding energy of the Earth-Moon system. To escape Earth's gravity entirely the Moon would need roughly 7.6 × 10²⁸ J of additional energy, an amount that is, in everyday terms, completely unimaginable but is in fact the natural consequence of two quite ordinary masses (in cosmic terms) acting on each other across nearly 400,000 km of empty space.
Example 6, The International Space Station (universal form)
The ISS has mass about 4.20 × 10⁵ kg and orbits at roughly 400 km altitude, so its distance from Earth's centre is r ≈ 6.771 × 10⁶ m.
U = -(6.674 × 10⁻¹¹) × (5.972 × 10²⁴) × (4.20 × 10⁵) / (6.771 × 10⁶) ≈ -2.47 × 10¹³ J
Its circular-orbit speed is √(GM/r) ≈ 7.67 km/s. Together, kinetic energy (about +2.47 × 10¹³ J) and potential energy (about -2.47 × 10¹³ J) sum to a total orbital energy of about -1.24 × 10¹³ J, the characteristic negative total that defines a bound orbit.
Where Gravitational Potential Energy Shows Up
Gravitational PE is one of the most-used ideas in physics and engineering.
- Hydroelectric power. Water held behind a dam stores gravitational PE. The potential energy of the column above the turbine is what becomes electricity.
- Pumped-storage hydroelectricity. During off-peak hours, water is pumped uphill into a reservoir; during peak hours it is released back through the turbines. The round-trip efficiency is typically 70 to 85%, making this the largest grid-scale energy storage technology available.
- Roller coasters. The chain lift at the start of a roller-coaster ride is doing work against gravity and storing PE that drives the rest of the ride.
- Pendulums. A pendulum continuously exchanges PE (at the extremes of its swing) with kinetic energy (at the bottom).
- Climbing, mountaineering, and fall protection. Estimating fall energies is critical for sizing ropes, anchors, and shock absorbers. A 70 kg climber falling 5 m stores roughly 3.4 kJ of PE.
- Satellite and orbital mechanics. The total mechanical energy of an orbit is the sum of kinetic energy (always positive) and gravitational PE (always negative for a bound orbit). The vis-viva equation v² = GM(2/r − 1/a) is essentially an energy-conservation statement.
- Astrophysics. Escape velocity, the speed at which an object can leave a gravitational well with no further propulsion, comes directly from setting total energy to zero.
- Tides. The Moon's gravitational PE gradient across the Earth is what raises ocean tides.
- Geophysics. The gravitational PE of material sinking or rising in the mantle drives plate tectonics.
Common Mistakes
Mixing reference frames. The near-surface formula PE = m · g · h gives an answer that depends on where you choose h = 0. Two observers using different reference heights will report different PE values for the same object. Only changes in PE are physically meaningful, so always quote PE relative to a clearly stated reference.
Using 9.81 everywhere. g is 9.81 m/s² on Earth's surface, 1.62 on the Moon, 3.71 on Mars, 8.87 on Venus, and about 24.79 on Jupiter. A 10 kg mass lifted 1 m on the Moon stores only 16.2 J; the same mass lifted 1 m on Jupiter stores 248 J.
Confusing mass with weight. Mass is measured in kilograms and is the same on Earth and on the Moon. Weight is a force (measured in newtons) and equals m·g. PE depends on mass, not weight. If you have a weight in newtons, divide by g first to get mass.
Forgetting the sign in the universal form. U = -G·M·m/r is negative for bound systems. When you rearrange the formula to solve for r = -G·M·m/U, that negative sign is essential, without it you would compute a negative distance. The negative sign reflects the convention that PE = 0 at infinity.
Using the wrong r in the universal form. r is the distance between the centres of mass of the two bodies, not the surface-to-surface distance. For an object on Earth's surface, r is Earth's radius (6.371 × 10⁶ m), not zero. For a satellite at altitude h, r = Rₑ + h.
Treating gravitational PE as "stored" rather than "potential". PE is not a property of the object alone; it is a property of the system of two (or more) interacting masses. Saying "this rock has 100 J of PE" is shorthand for "the rock-Earth system has 100 J of PE relative to a chosen reference."
Conservation of Mechanical Energy
In a frictionless system, the sum of gravitational PE and kinetic energy is constant:
PE₁ + KE₁ = PE₂ + KE₂
This lets you compute final velocity from initial height (or vice versa) without doing a kinematics problem:
m · g · h₁ + ½ · m · v₁² = m · g · h₂ + ½ · m · v₂²
For a drop from rest (v₁ = 0):
v = √(2 · g · h)
The same equation appears in the free-fall calculator, derived from energy conservation rather than kinematics. Energy methods are often faster than kinematics for problems where only initial and final states matter and the path in between is complex.
Frequently Asked Questions
What is gravitational potential energy? Gravitational potential energy is the energy an object has by virtue of its position in a gravitational field. Near Earth's surface it is PE = m·g·h; in the universal form it is U = -G·M·m/r. The two are equivalent in the appropriate regime, and both express the same physical idea: lifting a mass against gravity stores energy that can be recovered as kinetic energy when the mass falls.
What is the difference between the two formulas (PE = mgh and U = -GMm/r)? PE = m·g·h is the uniform-field approximation, valid when the height h is much smaller than the radius of the central body (in practice, within a few hundred kilometres of a planetary surface). U = -G·M·m/r is the inverse-square-law form, valid at any distance from a spherically symmetric body. The near-surface formula is a Taylor expansion of the universal form in the limit h ≪ R, where g = GM/R².
Why is the universal PE negative? It is defined to be zero at infinity. As two masses approach one another, energy is released (becomes more negative); as they separate, energy must be added (becomes less negative). For a bound orbit, total mechanical energy is negative, which is the mathematical statement that the orbiting body cannot escape without adding energy.
Can gravitational PE be positive? Yes, in the near-surface convention. If you choose the floor as your reference (h = 0 there), a book on a shelf has PE = m·g·h > 0. The sign depends entirely on where you put zero; only changes in PE are physically meaningful. In the universal convention, where zero is at infinity, all bound systems have negative PE.
How is g related to G? g is the local gravitational acceleration at the surface of a body, and equals G·M/R² where M is the body's mass and R is its radius. On Earth, g ≈ 9.81 m/s² because G·Mₑ/Rₑ² ≈ 9.81. On the Moon, g ≈ 1.62 m/s² because the Moon is much less massive. Both g and G are universal in the sense that the same value of G produces different surface values of g depending on the body's mass and radius.
What units should I use? Use SI units throughout: kilograms for mass, metres for height or distance, m/s² for gravity, and joules for energy. If you have a weight in newtons, divide by g to convert it to a mass in kilograms before entering it into the calculator. If you have a height in feet, multiply by 0.3048 to convert it to metres.
How accurate is the near-surface formula at altitude? For h much smaller than R (the radius of the central body), the error is on the order of h/R. On Earth (R ≈ 6,371 km), the formula is accurate to better than 1% up to roughly 60 km altitude, and to better than 5% up to about 320 km. For higher altitudes, switch to the universal form.
Why doesn't the formula depend on the path taken? Gravity is a conservative force, which means the work it does on an object depends only on the start and end points, not on the path between them. This is what allows gravitational PE to be defined as a function of position alone. For non-conservative forces such as friction, no such potential exists.
References
- Halliday, D., Resnick, R., & Walker, J. Fundamentals of Physics, 12th ed., Wiley (2021).
- Serway, R. A. & Jewett, J. W. Physics for Scientists and Engineers with Modern Physics, 10th ed., Cengage (2019).
- Young, H. D. & Freedman, R. A. University Physics, 15th ed., Pearson (2020).
- Goldstein, H., Poole, C., & Safko, J. Classical Mechanics, 3rd ed., Addison-Wesley (2001).
- NIST CODATA 2018, Fundamental Physical Constants: https://physics.nist.gov/cuu/Constants/
- NASA Planetary Fact Sheet, masses, radii, and surface gravity for solar-system bodies: https://nssdc.gsfc.nasa.gov/planetary/factsheet/