ForHosting KIT · Engineering & construction

Elastic collision calculator

A 2 kg body at 3 m/s hitting a resting 1 kg body leaves at 1 m/s while the second shoots off at 4 m/s. Momentum stays at 6 kg·m/s and kinetic energy at 9 J, and the tool shows both checks. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Mass of body 1
2
Mass of body 2
1
V1
3
V2
0
You get
V1 final
1
V2 final
4

A one-dimensional elastic collision is an impact between two bodies that move along a single line and exchange momentum without losing kinetic energy to heat, deformation, or sound. In the classical model you know each mass and each initial velocity, then you solve simultaneously for the two final velocities from conservation of linear momentum and conservation of kinetic energy. The closed-form solution is standard in every introductory mechanics course: body one leaves with a weighted mix of the two initial speeds, and body two leaves with the complementary mix. Equal masses simply exchange velocities; a light ball hitting a heavy wall nearly reverses; a heavy truck hitting a stationary pebble barely slows down while the pebble flies ahead. This calculator implements that analytic pair of formulas with deterministic floating-point arithmetic, returns final velocities plus momentum and energy check tables, and rejects negative mass with a clear validation error.

How a one-dimensional elastic collision is solved

Begin with two point masses m1 and m2 that interact only along a chosen axis during a brief contact interval. Let v1 and v2 be their velocities just before contact, signed so that the positive direction is the same for both. Isolation means external impulses along the line of impact are negligible compared with the mutual impulse, so total linear momentum m1 v1 plus m2 v2 is the same before and after.

Perfect elasticity means the total kinetic energy one half m1 v1 squared plus one half m2 v2 squared is also the same before and after, or equivalently the relative velocity reverses sign while keeping magnitude.

Solving those two scalar equations for the two unknowns yields the textbook closed forms: final velocity of body one equals open parenthesis m1 minus m2 close parenthesis over open parenthesis m1 plus m2 close parenthesis times v1 plus two m2 over open parenthesis m1 plus m2 close parenthesis times v2; final velocity of body two equals two m1 over open parenthesis m1 plus m2 close parenthesis times v1 plus open parenthesis m2 minus m1 close parenthesis over open parenthesis m1 plus m2 close parenthesis times v2.

Special cases fall out automatically: equal masses exchange velocities; if m2 approaches infinity and v2 is zero, body one reverses nearly to negative v1; if m1 is much larger than m2 and v2 is zero, body one keeps nearly v1 while body two leaves near two v1. Negative mass is rejected because classical mass is non-negative; both masses zero is rejected because the closed form divides by total mass. Non-finite numbers such as NaN and Infinity fail with invalid input so clients can fix units rather than guessing.

What you send and what you get back

Send four required finite numbers under the fields m1, m2, v1, and v2. Masses are typically in kilograms and velocities in metres per second; any consistent unit system works as long as both masses share a mass unit and both velocities share a speed unit. Negative m1 or negative m2 fails with a message that mass cannot be negative for a classical elastic collision.

Classic textbook checks include two kilograms hitting one kilogram at three metres per second with the second body at rest, equal masses exchanging five and negative two metres per second, and a light mass bouncing off a heavy stationary block. Keep the sign convention fixed across a lab report so positive always means the same direction on your diagram.

Where elastic collision calculators show up in real work

Secondary-school and introductory university physics courses assign one-dimensional elastic collision drills, equal-mass velocity exchange proofs, and wall-bounce limits before multi-dimensional or inelastic generalizations; a single trusted oracle speeds grading and demo setup. Game engines and interactive teaching simulations often need a closed-form elastic stub for inviscid billiard-style contacts where a full rigid-body solver is overkill. Robotics and conveyor labs estimate post-impact speeds of two carts on a low-friction track from measured pre-impact speeds and known cart masses.

Sports science staff convert ball-racket or puck-stick mass ratios into expected rebound speeds under an elastic idealization as a first bound before measured coefficients of restitution. If you later need inelastic collisions with a coefficient of restitution, two-dimensional glancing impacts, relativistic collisions, or only the linear momentum product without a collision model, treat those as separate search intents and landings rather than overloading this one-dimensional elastic collision calculator page.

Homework and lab answer keys

Generate final velocities, momentum tables, and kinetic-energy checks for textbook 1D elastic pairs so teachers and auto-graders share one ground truth.

Simulation and game physics stubs

Drop closed-form elastic outcomes into billiard, cart, or teaching demos without integrating a full contact solver for every frame.

Track and conveyor impact estimates

Estimate post-impact cart speeds on a low-friction rail from measured pre-impact speeds and known masses under an elastic idealization.

What formulas does this elastic collision calculator use?

Closed-form one-dimensional perfectly elastic results from conservation of momentum and kinetic energy: v1f = ((m1−m2)/(m1+m2))·v1 + (2·m2/(m1+m2))·v2 and v2f = (2·m1/(m1+m2))·v1 + ((m2−m1)/(m1+m2))·v2.

What happens if a mass is negative?

Classical mass cannot be negative; the error message names the field (m1 or m2) so you can correct the input.

Do equal masses exchange velocities?

Yes. When m1 equals m2, the formulas reduce to v1f = v2 and v2f = v1, the classic velocity-exchange result for a head-on elastic collision of equal masses.

What does it cost?

The browser tool is free and runs locally.

What happens when a light object hits a much heavier one at rest?

The light object bounces back at nearly its original speed, as a ball does off a heavy wall. In the reverse case a heavy body barely slows down, while the light one flies ahead at close to twice the heavy body's speed.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/mech/elastic-collision

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/mech/elastic-collision \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"m1":2,"m2":1,"v1":3,"v2":0}'
{
  "m1": 2,
  "m2": 1,
  "v1": 3,
  "v2": 0
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "mech.elastic_collision",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

How a one-dimensional elastic collision is solved

The entire pipeline is deterministic floating-point arithmetic with no random seeds, no wall-clock timestamps, no network calls, and no model drift, so identical inputs always produce identical JSON.

What you send and what you get back

Missing fields, non-numeric strings, NaN, and Infinity fail with invalid_input and are not charged. When both masses are zero the request fails because the formula would divide by zero. On success the response echoes cleaned inputs, v1_final and v2_final as the primary answers, a momentum block with initial and final partial and total momenta plus a conserved flag, a kinetic_energy block with the same structure for energies, a relative_velocity block that checks that the approach rate equals the separation rate with a sign flip, method set to elastic_1d_closed_form, a printable formula string, and a units hint. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.

Where elastic collision calculators show up in real work

Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.

Does kinetic energy stay the same?

Yes for a perfectly elastic model. The response includes initial and final kinetic energies with a conserved flag so you can verify floating-point conservation on every call.

Read the full KIT documentation →