1D momentum conservation calculator
This 1D momentum conservation calculator finds the unknown final velocity of the second object when both masses, both initial velocities, and the first object's final velocity are known.
Run — free
It applies total momentum before equals total momentum after, preserving velocity signs along one chosen axis. Use any consistent mass and velocity units. The result keeps the velocity unit you supplied and also reports the initial and reconstructed final momentum so you can verify the balance.
Set up a one-dimensional momentum problem
Begin by choosing one direction as positive and keep that convention for every velocity. Motion in the opposite direction must use a negative sign; a stationary object uses zero. Enter mass_1 and mass_2 in the same mass unit, then enter initial_velocity_1, initial_velocity_2, and the known final_velocity_1 in the same velocity unit. The calculator solves specifically for final_velocity_2. It does not assume that the objects stick together, rebound, or exchange equal speeds. Those behaviors depend on collision details, while conservation of total momentum supplies the single relationship needed here because one final velocity is already known. Both masses must be finite and nonzero. In ordinary physical applications masses should also be positive, although the computation enforces the requested nonzero rule rather than imposing a particular model beyond it. Before calculating, draw a small arrow for your positive axis and annotate every known velocity with a sign. This simple setup prevents the most common error: entering speed magnitudes while silently discarding direction. Units may be kilograms and metres per second, grams and centimetres per second, or another consistent pair. Do not mix mass or velocity units inside one calculation.
Understand the conservation equation
The calculation starts from m1 times v1i plus m2 times v2i equals m1 times v1f plus m2 times v2f. The two terms on the left are the objects' initial momenta, and the two terms on the right are their final momenta. Rearranging for the unknown gives v2f equals (m1 times v1i plus m2 times v2i minus m1 times v1f) divided by m2. The calculator evaluates that closed-form expression directly and deterministically. A negative answer is not an error: it means object 2 finishes moving opposite to the positive direction you selected. A zero answer means its final momentum is zero. Alongside final_velocity_2, the response gives initial_momentum and final_momentum. These totals should agree, apart from stable floating-point rounding, because the solved velocity is reconstructed into the final total. Momentum units are the chosen mass unit multiplied by the chosen velocity unit. The returned velocity uses exactly the velocity scale of the inputs. If a result looks surprising, inspect signs first, then confirm that both masses share a unit and all three known velocities share another unit.
Use the result within the model's limits
Momentum conservation applies to an isolated system or to a time interval in which external impulse is negligible. That makes the method useful for textbook collisions, carts on a low-friction track, idealized recoil, and preliminary checks of experimental observations. It does not by itself determine energy loss, collision duration, deformation, impact force, or whether a proposed event is physically achievable under additional constraints. For an elastic collision, kinetic-energy conservation adds another equation; for objects that lock together, both final velocities must be equal. This calculator intentionally does neither because you provide one final velocity and ask for the other. Treat measured inputs according to their precision: a very exact displayed value cannot repair uncertain masses or noisy velocity readings. When automating repeated calculations, validate the returned momentum totals and retain the original signed inputs in your records. Zero mass is rejected because division by mass_2 would be undefined and a zero mass_1 also falls outside the supported two-body model. The browser calculation is convenient for individual checks, while API requests cost $0.002 each for worksheets, lab pipelines, simulations, or teaching systems that need the same transparent equation applied consistently.
What you can do with it
Analyze a cart collision
Find the second cart's final signed velocity from measured masses, initial velocities, and the first cart's final velocity.
Check laboratory data
Compare reconstructed final momentum with initial momentum to catch sign, unit, or transcription mistakes.
Build physics exercises
Generate and verify one-dimensional momentum problems where exactly one final velocity is unknown.
FAQ
What equation does the calculator use?
It rearranges m1*v1i + m2*v2i = m1*v1f + m2*v2f to solve for v2f.
What does a negative final velocity mean?
It means object 2 moves opposite to the direction you defined as positive; it is not an error.
Which units should I use?
Use one consistent mass unit for both masses and one consistent velocity unit for all velocities. The answer uses that velocity unit.
Why are zero masses rejected?
A zero second mass makes the rearranged equation undefined, and either zero mass is outside this supported two-body momentum model.
Does this assume an elastic collision?
No. It conserves momentum only. Elastic-collision analysis would also require kinetic-energy conservation. Each API request costs $0.002, and individual browser calculations are also available.
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/mech/conservation-momentum-1d \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"mass_1":2,"initial_velocity_1":3,"mass_2":1,"initial_velocity_2":-1,"final_velocity_1":1}'const res = await fetch("https://api.kit.forhosting.com/mech/conservation-momentum-1d", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"mass_1": 2,
"initial_velocity_1": 3,
"mass_2": 1,
"initial_velocity_2": -1,
"final_velocity_1": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/mech/conservation-momentum-1d",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"mass_1": 2,
"initial_velocity_1": 3,
"mass_2": 1,
"initial_velocity_2": -1,
"final_velocity_1": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/mech/conservation-momentum-1d", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"mass_1":2,"initial_velocity_1":3,"mass_2":1,"initial_velocity_2":-1,"final_velocity_1":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"mass_1":2,"initial_velocity_1":3,"mass_2":1,"initial_velocity_2":-1,"final_velocity_1":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/mech/conservation-momentum-1d", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"mass_1": 2,
"initial_velocity_1": 3,
"mass_2": 1,
"initial_velocity_2": -1,
"final_velocity_1": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "mech.conservation_momentum_1d",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |