Mass-weighted signed coordinate x_cm.
Physics · Mechanics · Motion & Energy
Center of mass calculator — two masses on one axis
Find the center of mass of two positive masses on one signed coordinate axis. Both positions must refer to the same origin and positive direction.
Created v1.0
By Thibaut Grzelak, Mechanical Analysis Engineer
Results
Sum m₁ + m₂, shown as a secondary check.
x_cm = (m₁ × x₁ + m₂ × x₂) / (m₁ + m₂)—
Two positive masses represented by points on one straight coordinate axis; x₁ and x₂ are signed coordinates referenced to the same origin.
01Formulas and symbols
Formulas used
x_cm = (m₁ × x₁ + m₂ × x₂) / (m₁ + m₂)Mass-weighted average of the two signed positions.M = m₁ + m₂Total positive mass of the two-point system.02Assumptions and limits
Scope of validity
- Two positive masses represented by points on one straight coordinate axis; x₁ and x₂ are signed coordinates referenced to the same origin.
03Validation example
Reference numerical case
- For m₁ = 2 kg at x₁ = 0 m and m₂ = 3 kg at x₂ = 10 m, total mass is 5 kg.
- x_cm = (2 × 0 + 3 × 10) / (2 + 3) = 6 m.
04References
Technical references
FAQ
Can the center of mass lie outside the two masses?
For this two-point model with both masses positive, no: x_cm is a weighted average and lies between x₁ and x₂. Other geometries can have a center of mass in empty space, but that is different from lying outside the two point positions.
What happens if I change the coordinate origin?
If both positions are shifted by the same amount, the computed center-of-mass coordinate shifts by that same amount. Relative geometry is unchanged, which is why x₁ and x₂ must use one common reference frame.
05How it works
The heavier mass pulls the weighted average closer to its coordinate. Equal masses place x_cm exactly halfway between x₁ and x₂; unequal masses divide the interval inversely to their masses.
06Limits of the model
This first version handles exactly two positive masses on a one-dimensional axis. It is not an arbitrary N-point editor and does not integrate a distributed mass density.
07Common mistakes
Do not mix origins or positive directions between x₁ and x₂. Signed positions are allowed; a negative coordinate is not a negative distance or a negative mass.