ForHosting KIT · Engineering & construction

Two-dimensional collision calculator

A 2 kg body moving at 3 m/s along x that sticks to a 4 kg body moving at −1 and 2 m/s leaves with it at 1.3743685419 m/s, at 75.9637565321°. Enter masses and velocity components to get the shared motion. 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
M1
2
V1x
3
V1y
0
M2
4
V2x
-1
V2y
2
You get
Total mass
6 m/s
Total momentum x
2
Total momentum y
8
Final velocity x
0.3333333333

This two-dimensional collision calculator finds the single common final velocity vector after two bodies stick together in a perfectly inelastic planar collision. Kinetic energy is not conserved in this model: only the momentum vector is, which is the textbook definition of a perfectly inelastic event in two dimensions. Velocity components may be positive or negative to encode direction in the plane; masses must be non-negative, and the total mass must not be zero or the final velocity is undefined. The arithmetic is fully deterministic with no network calls, no sampling, and no date-dependent shortcuts.

What a sticking collision in a plane means

A perfectly inelastic collision is the extreme case where the two colliding objects stick together and move as one combined body after impact. In two dimensions, momentum conservation is a vector statement: if external impulses are negligible during the brief contact, the sum of mass times velocity before the crash equals the total mass times the shared final velocity after the crash, component by component.

Kinetic energy is not conserved; some or all of the lost kinetic energy appears as heat, deformation, or sound, but this calculator does not estimate those losses. It only reports the kinematic outcome of the stick-together model in the plane. Opposite-direction approaches use opposite component signs; a body initially at rest simply has both velocity components zero.

Where two-dimensional inelastic collisions fit in study, design, and software

Students meet planar stick-together collisions when a textbook moves from one-dimensional momentum to vector momentum, when a lab rolls two carts that couple after impact at an angle, or when a contest problem gives oblique approach velocities and asks only for the shared velocity after the objects join. Teachers can pre-generate answer keys for modest mass and component values without trusting opaque calculator apps that silently switch units or confuse elastic and inelastic cases, or that collapse the plane into a single axis.

Developers call the same contract from scripts to seed deterministic test vectors for game-physics demos, to normalize user-entered crash parameters before a free-body check, or to satisfy programming-challenge statements that demand a common final velocity vector rather than a hand-waved sketch. First-order engineering and product checks use the formulas when only masses and approach velocity components are known and a stick-together bound is enough before modeling deformation, multi-body contact, or friction.

Homework and lab checks

Compute common final velocity components from two masses and planar initial velocities before grading worksheets or comparing to motion-sensor data.

Tutoring and design software

Normalize user-entered masses and approach velocity components for vector-momentum lessons, crash demos, and interactive physics helpers.

What does the two-dimensional collision calculator cost?

It is free in your browser on this page.

How is the common final velocity defined in 2-D?

With masses in kg and velocities in m/s, components are in m/s.

What happens if total mass is zero?

Both masses zero (or total mass numerically zero) leaves the final velocity undefined.

Does this tool model elastic collisions or restitution?

No. It only computes the common final velocity vector for a perfectly inelastic stick-together event in the plane. Use a different tool if you need elastic bounce speeds or a coefficient of restitution.

Why are results rounded to a precision?

Default precision is 10 decimal places; you can set precision from 0 to 15.

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/two-body-collision-2d

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/two-body-collision-2d \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"m1":2,"v1x":3,"v1y":0,"m2":4,"v2x":-1,"v2y":2}'
{
  "m1": 2,
  "v1x": 3,
  "v1y": 0,
  "m2": 4,
  "v2x": -1,
  "v2y": 2
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "mech.two_body_collision_2d",
  "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.

max_abs_mass1000000000000000
max_abs_velocity1000000000000000
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.

You supply the two masses and the Cartesian components of each body's initial velocity; the engine applies conservation of momentum separately on the x-axis and the y-axis and returns v_fx equals open parenthesis m1 times v1x plus m2 times v2x close parenthesis divided by open parenthesis m1 plus m2 close parenthesis, and the same form for v_fy with the y-components.

What a perfectly inelastic 2-D collision means and what the response contains

That identity yields the closed forms v_fx equals open parenthesis m1 v1x plus m2 v2x close parenthesis over open parenthesis m1 plus m2 close parenthesis and v_fy equals open parenthesis m1 v1y plus m2 v2y close parenthesis over open parenthesis m1 plus m2 close parenthesis. The response returns the normalized inputs m1, v1x, v1y, m2, v2x, and v2y, the total_mass m1 plus m2, the total_momentum_x and total_momentum_y components, the final_velocity_x and final_velocity_y of the combined body, the final_speed as the Euclidean magnitude of that vector, the final_angle_deg measured from the positive x-axis with atan2, the precision used, a method tag perfectly_inelastic_collision_2d, a short formula reminder, and a unit hint m/s when masses are in kilograms and velocities in meters per second. There is no multi-body contact simulation, no coefficient of restitution path, and no rotation or friction model: the engine either evaluates the momentum quotients inside the supported numeric range or rejects the input with invalid_input. Rejected cases include missing masses or velocity components, non-finite values, magnitudes above the documented ceilings, negative mass, and any case where total mass is zero or numerically zero, because division by zero leaves no defined common final velocity.

How masses and velocity components are read and how v_f stays reproducible

Zero mass for one body is allowed when the other mass is positive, which simply reduces to the remaining body keeping its velocity vector. Both masses zero is rejected because total mass must not be zero. Velocity components may be positive, negative, or zero to encode direction in the plane; the tool does not convert unit systems for you, so keep masses consistent with each other and velocities in a matching length-per-time unit. Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces and non-numeric tokens are rejected. The preferred fields are m1 and m2 for the two masses and v1x, v1y, v2x, and v2y for the four initial velocity components, but aliases mass1, M1, and mass_1 for m1, mass2, M2, and mass_2 for m2, and vx1, velocity1_x, u1x for v1x plus the matching aliases for the other three components are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. Masses must be finite and non-negative: a negative mass fails with invalid_input and a message that names the field, so a bad cell does not become a silent nonsense result. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for the numeric outputs, defaulting to ten and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the planar inelastic-collision formulas yourself.

Where two-dimensional inelastic collisions fit in study, design, and software

Product and education tools use the endpoint when a learner types two masses and four velocity components and the UI must show the combined velocity after a perfectly inelastic planar crash. On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with the one-dimensional inelastic helper when the motion is collinear, with elastic-collision helpers when bounce speeds are needed, and with other math endpoints when you are building a small lab of free, deterministic physics calculators for two-dimensional mechanics.

Deterministic test fixtures

Generate reproducible v_fx and v_fy values for unit tests, game-physics demos, and CI assertions on stick-together 2-D collisions.

Read the full KIT documentation →