Gravitational Potential Energy Calculator: U = mgh
Solve potential energy, mass, gravity or height with U = mgh. Pick Earth, Moon, Mars, Jupiter and more, in joules, kJ or ft·lbf. Free and private, runs in your browser.
3 fields are empty. Fill in all but one.
About the Gravitational Potential Energy Calculator
The Gravitational Potential Energy Calculator solves U = m g h. Fill in any three of Potential energy, Mass, Gravitational acceleration and Height and the remaining one is calculated as you type, with the equation and the substitution shown below the result.
Lift an object against gravity and you do work on it. That work is stored as gravitational potential energy and is released as the object falls. Gravity defaults to standard Earth gravity, 9.80665 m/s², and a Gravity preset menu fills it in for Earth, the Moon, Mars, Venus, Jupiter, Saturn, Mercury and the Sun.
How to use the gravitational potential energy calculator
Steps
- Leave the field you want to find empty and fill in the other three. Gravity is already set to Earth.
- To use another world, choose it from the Gravity preset menu and the gravity field changes to that value.
- Choose units: energy in joules and other energy units, mass in kg, g or lb, gravity in m/s² or ft/s², and height in any length unit.
Mass and gravity must be greater than zero. Height may be negative, which means the object is below the level you chose as zero. Solving for mass or gravity with a height of zero shows a "cannot divide by zero" message.
Formula
U is energy in joules, m is mass in kilograms, g is the gravitational acceleration in metres per second squared and h is the height in metres above your chosen zero level. The formula applies near a planet's surface, where g is close to constant. Only the change in height matters for the energy a falling object gains, so the zero level can be anywhere convenient, such as the floor or the ground.
Worked examples
Example 1: lifting a mass on Earth
A 10 kg box is raised 5 m. U = 10 × 9.80665 × 5 = 490.3325 J.
Example 2: the same lift on the Moon
With the Moon preset, g = 1.62 m/s². U = 10 × 1.62 × 5 = 81 J, about one sixth of the Earth value.
Example 3: find the mass
An object holds 1 000 J at a height of 20 m on Earth. m = 1 000 ÷ (9.80665 × 20) ≈ 5.0986 kg.
Example 4: find the height
A 2 kg mass holds 100 J on Earth. h = 100 ÷ (2 × 9.80665) ≈ 5.0986 m.
Good to know
- Potential energy turns into kinetic energy as an object falls. Ignoring air resistance, m g h = ½ m v², so v = √(2 g h) whatever the mass.
- The energy depends on the height difference, not on the path taken. Carrying a load up a ramp or straight up takes the same energy gain.
- Far from the surface, g is no longer constant and the full formula U = −G M m / r is needed.
Privacy
Nothing is uploaded; every calculation runs in your browser and never leaves your device.
Related tools
Use the Kinetic Energy Calculator for the motion the energy becomes, the Weight Calculator for m g as a force, and the Work Calculator for the work done in lifting.
Frequently asked questions
What is gravitational potential energy?
It is the energy an object has because of its height in a gravitational field. Near a planet's surface it equals mass times gravitational acceleration times height: U = m g h.
How do I calculate potential energy?
Multiply the mass in kilograms by g and by the height in metres. A 10 kg box lifted 5 m on Earth has 10 × 9.80665 × 5 = 490.3325 J. Leave the energy field empty and the calculator does the multiplication, converting units for you.
What value of g does the calculator use?
It starts with standard gravity, 9.80665 m/s². The presets switch to the Moon (1.62), Mars (3.72), Venus (8.87), Jupiter (24.79), Saturn (10.44), Mercury (3.7) and the Sun (274) in m/s². You can also type any value of your own.
Where is the zero level for height?
You choose it. Height is measured from whatever level you call zero, such as the floor or sea level. A negative height means the object is below that level and gives negative potential energy. Only differences in height matter for the energy gained or lost.
Does the path of the object matter?
No. Gravity is a conservative force, so the energy depends only on the starting and ending heights. Lifting an object straight up or pushing it up a ramp to the same height gives the same change in potential energy.
How does potential energy become kinetic energy?
As an object falls it loses m g h of potential energy and, ignoring air resistance, gains the same amount of kinetic energy. Setting m g h equal to ½ m v² gives the speed v = √(2 g h), independent of mass.
Why can I not solve for mass when the height is zero?
At zero height the potential energy is always zero, whatever the mass, so dividing the energy by g × h would mean dividing by zero. The calculator shows a message instead of an invalid number.
Does it send my numbers anywhere?
No. The mass, gravity, height and energy you enter are solved locally in your browser, and nothing is uploaded, stored or shared with any server.