Kinetic & Potential Energy Calculator
KE = ½mv² and PE = mgh for any mass, speed and height, with a kinetic-energy-vs-speed plot.
Kinetic and potential energy
Kinetic energy against speed
At your mass. Note the curve, not a line — KE grows with the square of speed.
Show the Larzscript program that just ran
Run a calculation to see the exact program.
This is the real program the page sent to the Larzscript interpreter (compiled to WebAssembly) in your browser. The library it imports is the same code the automated tests check.
The formulas
Both are in joules for SI inputs (kilograms, metres per second, metres). PE is always relative to a reference height you choose as zero.
Worked examples, computed above
1200 kg at 25 m/s: 375 000 J. 70 kg raised 2 m on Earth: 1 372.9 J.
What is verified
Speed and mass are round-tripped back out of a given kinetic energy, and the elastic-collision calculator on this site independently confirms that total kinetic energy is conserved where physics says it must be — see tests/test_mechanics.lz.
Frequently asked questions
What is kinetic energy?
KE = ½mv² — the energy an object has because of its motion. A 1200 kg car at 25 m/s (90 km/h) carries 375 000 J; a 70 kg person walking at 1.4 m/s carries only 68.6 J.
Why is speed squared and not mass?
Both matter, but doubling speed quadruples kinetic energy while doubling mass only doubles it — this is why braking distance and crash energy rise so sharply with speed.
What is gravitational potential energy?
PE = mgh — the energy stored by height in a gravitational field, relative to whatever height you call zero. Raising a 70 kg person 2 m against Earth's gravity stores about 1373 J, recovered as kinetic energy on the way down (ignoring air resistance).
Do PE and KE trade off exactly?
In the absence of friction and air resistance, yes: mgh converts fully to ½mv² in free fall, which is exactly how the free-fall speed formula v = √(2gh) is derived — try it by plugging this page's PE into this page's KE.
Every number on this page is computed by the open-source larzscript-physics library (mechanics, physmath), written in Larzscript, and checked against independent references in its test suite. How it is verified →