Momentum & Collision Calculator
1-D elastic and perfectly inelastic collisions: final velocities, momentum and the kinetic energy lost.
Momentum and collisions (1-D)
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
Positive and negative velocities represent opposite directions along one line — enter a negative speed for an object moving the other way.
Worked example, computed above
1000 kg at 15 m/s meets 1500 kg at -10 m/s: perfectly inelastic combined speed 0 m/s, losing 187 500 J of kinetic energy.
What is verified
Every elastic-collision result is checked to conserve both total momentum and total kinetic energy exactly against independently computed before/after sums, and equal-mass exchange and equal-and-opposite-stops-dead special cases are checked against the textbook results — see tests/test_mechanics.lz.
Frequently asked questions
What is conserved in a collision?
Total momentum (p = mv, summed over both objects) is always conserved when no outside force acts. Kinetic energy is only conserved in an elastic collision; a perfectly inelastic collision (objects stick together) conserves momentum but loses kinetic energy to heat, sound and deformation.
What happens when equal masses collide elastically?
They exchange velocities completely — a standard result checked on this page: a 1 kg object at 2 m/s hitting an identical stationary one leaves the first at 0 m/s and the second moving off at 2 m/s, just like one billiard ball striking another.
How much energy is lost when things stick together?
For a 1000 kg car at 15 m/s hitting a 1500 kg car moving the other way at 10 m/s, the two crumple together, and about 187 500 J of kinetic energy is lost to the collision — this is why 'sticking together' crashes are more damaging than glancing, elastic-like ones at the same speeds.
Which is more realistic, elastic or inelastic?
Real macroscopic collisions (cars, dropped objects) are almost always somewhere between the two, tending toward inelastic; billiard balls and gas molecules are close to elastic. Both are idealizations useful for bounding the real answer.
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 →