Center of Mass Calculator
Find the balance point of two particles on a line.
What it does
The centre of mass of a system is the weighted average of the positions of its parts. For two particles on a line, it lies somewhere between them and shifts toward the heavier one.
University of Rochester physics notes define the centre of mass of two particles using the mass weighted average of their positions. The same idea extends naturally to three dimensions and many particles.
Coimbra University notes give the vector form and show how the relative coordinate and centre of mass coordinate separate the motion of the system from its internal motion.
This tool takes two masses and their positions on a line and returns the centre of mass position and the total mass.
The result uses the same position units you enter. Negative positions are allowed.
How to use
- Enter the first mass and its position.
- Enter the second mass and its position.
- Read the centre of mass position in the main result.
- Check the total mass below it.
- Try equal masses to see the midpoint.
- Move one mass upward and watch the centre shift toward it.
Formula
- m1, m2
- The two masses.
- x1, x2
- Their positions on a line.
- x_cm
- Centre of mass position.
- total mass
- Sum of the two masses.
The engine computes the weighted sum and divides by the total mass. Positions can be negative because the formula depends on the chosen origin.
Worked example
Example: unequal masses
Masses 2 and 3 at positions 0 and 10.
- The weighted sum is 2 x 0 + 3 x 10 = 30.
- The total mass is 2 + 3 = 5.
- Centre of mass = 30 / 5 = 6.
- The tool reports centre 6 and total mass 5.
- The point is closer to the heavier mass at position 10.
- With equal masses the result would be the midpoint at 5.
Reference table
| m1 | m2 | x_cm |
|---|---|---|
| 1 | 1 | 5 |
| 2 | 3 | 6 |
| 4 | 1 | 2 |
| 9 | 1 | 1 |
Limits
- The tool handles two particles on a line only.
- It does not handle continuous bodies or three dimensions.
- Masses must be positive.
- Results are shown to eight decimal places.
Common mistakes
- Averaging the positions without weighting by mass.
- Using negative masses, which the tool rejects.
- Forgetting that the origin choice does not affect the physical point.
- Assuming the centre of mass must be at a particle position.
- Mixing mass units between the two particles.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is the centre of mass for masses 2 and 3 at 0 and 10?
6.
Where is it for equal masses?
At the midpoint.
Why does it shift toward the heavier mass?
Because that mass carries more weight in the average.
Questions
What is centre of mass?
The mass weighted average position of a system.
What is the formula for two particles?
(m1 x1 + m2 x2)/(m1 + m2).
Can positions be negative?
Yes. They depend on the chosen origin.
Is it the same as centre of gravity?
In a uniform gravitational field, yes.
Does the tool handle three dimensions?
No. It works on a line.
What if masses are equal?
The centre of mass is the midpoint.