Potential Energy Calculator

Calculate gravitational potential energy from mass and height or elastic potential energy stored in a stretched spring.

Potential energy calculator
Choose an energy model, enter SI values, and calculate stored energy in joules.

About potential energy

Potential energy is energy stored because of position or configuration. Unlike kinetic energy, which depends on motion, potential energy depends on the relationship between an object and a force field or on deformation within a system. This calculator covers two standard introductory-physics models: gravitational potential energy near a planetary surface and elastic potential energy in an ideal linear spring. Both results are expressed in joules. Near Earth's surface, gravitational potential energy relative to a chosen reference height is U = mgh. Here m is mass in kilograms, g is gravitational acceleration in metres per second squared, and h is vertical height in metres. The default g value of 9.81 m/s² is a common Earth approximation. Potential energy is relative, so h is measured from whatever zero level is useful for the problem. Only differences in potential energy affect motion; changing the reference adds the same constant to all positions without changing physical predictions. The constant-gravity expression works when the height change is small compared with the planet's radius. For satellites, interplanetary problems, or very large altitude changes, use the universal gravitational potential U = -GMm/r instead. Local gravitational acceleration also varies slightly with latitude and elevation. You can replace the default value for the Moon, Mars, another body, or a more precise local calculation. An ideal spring stores elastic energy U = ½kx², where k is spring constant in newtons per metre and x is displacement from the relaxed equilibrium length in metres. Squaring displacement means equal compression and extension store the same energy in the ideal model. The equation follows by integrating the Hooke's-law force F = kx from zero displacement to x. It applies only while the spring remains linear and elastic; real springs can show preload, hysteresis, coil contact, yielding, or nonlinear stiffness. Energy conservation often converts potential energy into kinetic, thermal, acoustic, or deformation energy. A falling object can ideally gain kinetic energy equal to its lost gravitational potential energy, while a released spring can accelerate an attached mass. Real systems dissipate some mechanical energy through drag, friction, damping, and internal losses. Use this calculator for homework, laboratory planning, quick design estimates, and energy comparisons. For safety-critical lifting or spring systems, account for efficiency, dynamic impact, material limits, fatigue, and an appropriate design factor.

Potential energy examples

Common situations demonstrate both supported models.

SituationStored energyCalculation
10 kg raised 5 m on Earth490.5 J10 × 9.81 × 5 using the selected reference height.
2 kg raised 3 m on the Moon, g 1.62 m/s²9.72 JThe same mass and height store less gravitational energy in weaker gravity.
200 N/m spring displaced 0.10 m1 JOne half times 200 times 0.10 squared.
500 N/m spring compressed 0.20 m10 JCompression and extension use the displacement magnitude in the ideal model.

How to use the calculator

  1. Choose gravitational or elastic potential energy.
  2. For gravity, enter mass, vertical height from your reference, and gravitational acceleration.
  3. For a spring, enter spring constant and displacement from equilibrium.
  4. Select Calculate Energy to display stored energy in joules.

Potential energy FAQ

Why can I choose the zero height?

Gravitational potential energy near Earth is defined relative to a reference level. Physical motion depends on energy differences, so any consistent zero height gives the same change in energy.

Can gravitational potential energy be negative?

Yes, its sign depends on the chosen reference and on the model. This near-surface calculator uses nonnegative height, while universal gravitational potential is conventionally negative relative to zero at infinity.

Does spring compression store energy too?

Yes, ideal elastic energy depends on displacement squared. Equal compression and extension therefore store equal energy when the spring follows Hooke's law.

When does the spring formula stop working?

It stops being accurate when force is not proportional to displacement. Large deformation, yielding, coil contact, preload, and material hysteresis can all require measured force-displacement data.

Is 9.81 m/s² always the right gravity value?

It is a useful average near Earth's surface but varies slightly by location and altitude. Enter a different value for another planet, moon, or a precision local calculation.