Potential Energy Calculator
Two formulae, both worked out from the numbers you enter: mass times g times height for gravity, and k times x squared over two for an ideal spring. The part most pages leave out is the reference. Gravitational potential energy is not a property of an object, it is a difference between two heights, so this page names the zero the height is measured from, right on the stage, and treats a position below it as an ordinary entry: 2 kg at 3 m with g = 9.8 is 58.8 J, and the same mass 1.5 m below that line is -29.4 J. The acceleration is a field rather than a constant we picked, because 9.8 is a rounding: standard gravity is 9.80665 m/s², which turns the same lift into 58.8399 J, and the Moon at 1.62 gives 9.72 J. A table under the result runs your own mass and height at seven published accelerations so you can see the spread. The arithmetic is decimal from end to end rather than floating point, so 58.8 J is 58.8 J and not 58.800000000000004, and a spring of 45 N/m held 0.7 m from rest reads 11.025 J rather than the 11.024999999999999 a chain of doubles returns. A spring of 100 N/m at 0.2 m holds 2 J; stretch it to 0.4 m and the energy is 8 J, four times as much, because the energy goes with the square. Each box takes up to 15 significant digits with kilograms, grams, tonnes, pounds or ounces, and metres, centimetres, millimetres, kilometres, feet or inches, every conversion by its exact definition. Nothing is uploaded, nothing needs an account, and the only thing kept is your last entry in this browser.
A mass of 2 kg, 3 m above the height you call zero, holds 58.8 J of gravitational potential energy relative to that height.
Joules from kilograms, metres and m/s², with the height counted from the zero you chose. g is whatever is in the field, here 9.8 m/s²: standard gravity is defined as 9.80665 m/s², and the real surface value runs from about 9.78 m/s² at the equator to about 9.83 m/s² at the poles, so a textbook answer can differ in the third digit.
Gravitational energy is a difference, not a property of the object: choose the height you call zero and everything is measured from it, so a position below that height is negative.
Both formulae are worked out in exact decimal arithmetic rather than in floating point, so 2 kg at 3 m under g = 9.8 comes back as 58.8 J and not as the 58.800000000000004 a chain of doubles gives. Each box takes up to 15 significant digits and reads spaces, commas and underscores as group separators, so 1,000 and 1 000 are the same number, and an exponent such as 1.5e3 is read as well. Mass, spring constant and g are positive; the height and the displacement carry the sign, so a position below your zero gives a negative energy and a compression stores exactly what the equal stretch stores. Units convert by their definitions: a pound is 0.45359237 kg and a foot is 0.3048 m. An energy too long for the line is rounded to 12 significant digits, says so, and copies at full length. Your entry is kept in this browser so the page opens where you left it.
The same mass and height elsewhere
Every row is your mass and height with that row's acceleration. Standard gravity is a defined constant; the rest are the nominal figures usually quoted, and none of them is a measurement of where you are.
| Where | g | Energy |
|---|---|---|
| Earth, classroom valueThe rounded figure most textbooks use. | 9.8 m/s² | 58.8 J |
| Earth, standard gravityThe constant defined by the 3rd CGPM in 1901. | 9.80665 m/s² | 58.8399 J |
| Earth, at the equatorAbout the sea-level value at the equator. | 9.78 m/s² | 58.68 J |
| Earth, at the polesAbout the sea-level value at the poles. | 9.83 m/s² | 58.98 J |
| The MoonThe nominal surface value quoted for the Moon. | 1.62 m/s² | 9.72 J |
| MarsThe nominal surface value quoted for Mars. | 3.72 m/s² | 22.32 J |
| JupiterThe nominal value quoted at Jupiter's cloud tops. | 24.79 m/s² | 148.74 J |
Common questions
- What is the formula for potential energy?
- For gravity it is U = mgh: mass in kilograms, times the acceleration due to gravity in metres per second squared, times the height above whatever point you are calling zero. For an ideal spring it is U = kx squared over two, with the spring constant in newtons per metre and the displacement from the natural length in metres. Both give joules, and this page prints the substituted line beside the answer, so 2 kg at 3 m with g = 9.8 shows as U = m g h = 2 x 9.8 x 3 = 58.8 J rather than as a bare number.
- Why is my potential energy negative?
- Because the height you entered is below the point you chose as zero, and gravitational potential energy is a difference from that point rather than an absolute amount. Nothing is wrong with the sum: 2 kg sitting 1.5 m below your reference is -29.4 J, which is the energy the object would gain on the way back up to the line. Move your zero to the floor and the same object reads 29.4 J relative to the floor instead. The number changes with the reference and the difference between two heights does not, which is why this page names the zero on the stage and in the text it copies.
- What value of g should I use?
- Whichever one your problem assumes, which is why g is a field here rather than a constant. The page opens on 9.8 m/s², the figure most classrooms round to. Standard gravity, the constant defined by the 3rd CGPM in 1901, is 9.80665 m/s², and it turns 2 kg at 3 m into 58.8399 J instead of 58.8 J. Real surface gravity varies with latitude and altitude, from about 9.78 at the equator to about 9.83 at the poles, a spread of roughly half a percent. The buttons beside the field fill in Earth, standard gravity, the Moon at 1.62, Mars at 3.72 and Jupiter at 24.79, and the table under the result works your own numbers at all seven.
- How do you calculate the energy stored in a spring?
- Square the displacement from the spring's natural length, multiply by the spring constant, and halve it. A spring of 100 N/m held 0.2 m from rest stores 100 x 0.04 / 2 = 2 J, and it takes 20 N to hold it there. The square is what surprises people: pull the same spring to 0.4 m and the energy is 8 J, four times as much for twice the distance, while the force only doubles to 40 N. A compression stores exactly what the equal stretch does, so entering -0.2 m gives the same 2 J with the force reversed. The table under the result lays out five displacements so the square law is visible rather than asserted.
- Can I enter pounds, feet or grams?
- Yes. Mass takes kilograms, grams, tonnes, pounds or ounces, and the height and the spring displacement take metres, centimetres, millimetres, kilometres, feet or inches. The spring constant takes newtons per metre, per centimetre or per millimetre. Every conversion uses the defined value rather than a rounded one, so a pound is exactly 0.45359237 kg and a foot exactly 0.3048 m, and the page restates a non-SI entry in SI under the result. The energy is always in joules, since that is what the formula produces once the inputs are in kilograms, metres and m/s².
- How accurate is the arithmetic?
- It is exact, which is not the same as saying the answer is true of the world. Every quantity is held as a decimal and a power of ten rather than as a floating-point number, and multiplying, squaring and halving all keep a decimal a decimal, so 2 kg at 3 m under 9.8 is 58.8 J and not the 58.800000000000004 a chain of doubles returns, and 70 kg lifted 1.75 m at standard gravity is 1201.314625 J to the last digit. Each box takes up to 15 significant digits; an energy too long for the line is rounded to 12 and says so, and the copied text carries the exact value. What the page cannot know is whether your g is the g where you are standing, or whether a real spring still obeys F = kx at the displacement you typed.
- What is the difference between potential and kinetic energy?
- Potential energy is stored by position: how high something sits above your reference, or how far a spring is from its natural length. Kinetic energy is carried by motion, one half m v squared. In an ideal drop the first turns into the second, so the 58.8 J of a 2 kg mass at 3 m is what it arrives with at the line you called zero, ignoring the air. This page does the storage side only: it takes a position and returns joules, and it makes no claim about what happens on the way down.
Exact arithmetic on the formula you choose: mass times g times height for gravity, with both the acceleration and the zero height yours to set, and kx² over two for an ideal spring. Gravitational potential energy is only ever a difference from a reference, which is why a height below it comes out negative. It is a physics calculation, not guidance about lifting, loads or equipment.