Center of mass velocity calculator
Two particles, 2 kg at 3 m/s and 1 kg at rest, have a center of mass moving at 2 m/s and a total momentum of 6 kg·m/s. List each mass and signed velocity to get the single reference velocity of the system. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
The centre of mass of a particle system moves as if the entire mass were concentrated at one point and all external forces acted there. Students use this identity before conservation-of-momentum problems; robotics and game engines use it to reduce multi-body motion to a single reference velocity. This calculator accepts a list of particles with mass and signed velocity, returns total mass, total momentum, and centre-of-mass velocity, and rejects a zero total mass that would divide by zero.
What the center-of-mass velocity tells you
Imagine a group of bodies moving along one straight line, each with its own mass and speed. The center of mass of that group moves as if all the mass sat at a single point. Its velocity is a weighted average: every particle counts in proportion to its mass, so a heavy body pulls the result toward its own speed far more than a light one. Multiply the result by the total mass and you get the total momentum of the group, which is why this number is the usual starting point for conservation-of-momentum problems, before-and-after lab tables and rough checks in sports science.
How it is worked out, and common mistakes
For each particle, multiply its mass by its velocity to get its momentum, add those momenta together, then divide by the sum of the masses. With 2 kg at 3 m/s and 1 kg at rest, the total momentum is 6 kg·m/s, the total mass is 3 kg and the center of mass moves at 2 m/s. Choose one positive direction first and give a minus sign to anything moving the other way; a missing sign is the most frequent error. Equal masses moving apart at equal speeds give zero, even though both are moving. Keep the same units for every particle, and remember that a total mass of zero has no answer.
Where centre-of-mass velocity shows up in real work
Curriculum authors and LMS plugins need a deterministic oracle that rejects zero total mass instead of silently emitting Infinity that a buggy grader might accept. Game engines and interactive teaching demos often need a closed-form COM velocity for inviscid multi-particle stubs where a rigid-body solver is overkill. Sports science and biomechanics staff sometimes estimate effective system velocity from segment masses and segment speeds as a rough linear-momentum check.
Failed validation does not consume balance. Keep requests small, pin the cleaned numeric fields in tests, and you get reproducible centre-of-mass velocity and total-momentum figures for homework, design notebooks, and edge workers without standing up a full multi-body stack of your own. If you later need elastic or inelastic collision outcomes, single-body linear momentum alone, or centre-of-mass position from coordinates, treat those as separate search intents and landings rather than overloading this particle-system velocity page.
What you can do with it
Centre-of-mass frame prep for collisions
Build before-and-after system velocity tables for one-dimensional multi-body labs without manual weighted-average mistakes.
FAQ
What formula does this center of mass velocity calculator use?
Results use consistent units (typically m/s for velocity and kg·m/s for momentum).
Can particle velocities be negative?
Yes. Velocity is signed along your chosen axis.
Is this the same as a single-body momentum calculator?
No. Single-body momentum is p = m v for one mass. This tool takes a particle system, returns the mass-weighted COM velocity, and reports total momentum of the whole list. Different search intent, different landing.
What does the center of mass velocity calculator cost?
The browser tool is free and runs locally.
What happens if the total mass is zero?
The calculator stops and asks you to correct the values, because dividing by a total mass of zero has no meaning and there is no center-of-mass velocity. Each mass may be zero or positive, but at least one must be greater than zero.
Related tools
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/center-of-mass-velocity \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"particles":[{"mass":2,"velocity":3},{"mass":1,"velocity":0}]}'const res = await fetch("https://api.kit.forhosting.com/mech/center-of-mass-velocity", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"particles": [
{
"mass": 2,
"velocity": 3
},
{
"mass": 1,
"velocity": 0
}
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/mech/center-of-mass-velocity",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"particles": [
{
"mass": 2,
"velocity": 3
},
{
"mass": 1,
"velocity": 0
}
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/mech/center-of-mass-velocity", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"particles":[{"mass":2,"velocity":3},{"mass":1,"velocity":0}]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"particles":[{"mass":2,"velocity":3},{"mass":1,"velocity":0}]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/mech/center-of-mass-velocity", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"particles": [
{
"mass": 2,
"velocity": 3
},
{
"mass": 1,
"velocity": 0
}
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "mech.center_of_mass_velocity",
"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. |
Technical notes
In one dimension its velocity is the mass-weighted average of the particle velocities: v_cm equals the sum of m_i times v_i divided by the total mass M. That same numerator is the total linear momentum P of the system, so the compact relation P equals M times v_cm is always available when M is non-zero.
How centre-of-mass velocity is defined for a particle system
Begin with a one-dimensional axis and choose a positive direction. Each particle i has a mass m_i that is non-negative in classical mechanics and a velocity v_i that may be positive, negative, or zero along that axis. The total mass of the system is the ordinary sum M equals the sum of every m_i. The total linear momentum is the sum of each product m_i times v_i, often written P equals sum m_i v_i. The centre-of-mass velocity is then the ratio v_cm equals P over M, which is exactly the mass-weighted mean of the individual velocities. When every particle moves at the same velocity, v_cm equals that common value regardless of how mass is distributed. When equal masses move in opposite directions with equal speeds, momentum cancels and v_cm is zero even though kinetic energy is not. When total mass is zero, the ratio is undefined: there is no classical centre-of-mass velocity, and this tool reports invalid_input instead of Infinity or NaN. Units stay consistent by convention—kilograms and metres per second yield kilogram metres per second for momentum and metres per second for v_cm—but any coherent pair of mass and speed units works because the ratio is homogeneous.
What you send and what you get back
Mass must be non-negative; velocity is signed along your axis. Keep units consistent across a multi-step lab so the numeric product still matches the SI interpretation your report claims. POST a JSON body with one required field particles: a non-empty array of objects, each with mass and velocity as finite numbers. Item aliases m for mass and v or vel for velocity are accepted; the array itself also accepts bodies, system, and particles_list. Missing particles, an empty list, non-object rows, non-finite components, negative mass, NaN, and Infinity fail with invalid_input naming the problem and are not billed. When the absolute value of the summed mass falls below a tiny epsilon, the error states that total mass is zero and that centre-of-mass velocity cannot be computed because division by zero would occur in v_cm equals P over M, so clients can fix the mass list rather than guessing. On success the response includes particle_count, a cleaned particles array that echoes mass and velocity and adds per-particle momentum m times v, total_mass M, total_momentum P, center_of_mass_velocity as P divided by M, the formula string v_cm equals sum of m_i v_i over sum of m_i, method center_of_mass_velocity, and a units hint object for mass, velocity, and momentum. Classic textbook checks include two kilograms at three metres per second plus one kilogram at rest for total momentum six and v_cm of two metres per second; three equal masses with velocities that cancel for zero v_cm; and an all-zero mass list that must fail validation. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where centre-of-mass velocity shows up in real work
Secondary-school and introductory university physics courses introduce v_cm before collision labs so students can rewrite multi-body problems in the centre-of-mass frame and check that total momentum equals M times v_cm. Robotics and multi-body simulation teams use the same ratio as a first-pass system velocity for payload trains on a rail before full dynamics models.
Integration use cases
Homework and lab answer keys
Compute v_cm and total momentum P=Σmv from a particle list so students and auto-graders share one closed-form ground truth.
Robotics and multi-body first-pass velocity
Estimate system COM velocity from payload masses and axis speeds before full multi-body dynamics models.
Technical questions
What happens if total mass is zero?
The request fails with invalid_input. Centre-of-mass velocity is undefined when Σ m_i = 0 because the defining ratio would divide by zero.