Center of Mass Calculator
The center of mass of a system is the single point that behaves as if all the mass were concentrated there. For two bodies along a line, it is the mass-weighted average of their positions, always lying between them and closer to the heavier one. It is the balance point of the system and the point that follows a simple trajectory under external forces. This calculator takes two masses and their positions, then returns the center of mass position, the total mass, and its distance from each body.
Center of mass formula
Total mass M = m1 + m2
Center of mass x_cm = (m1 * x1 + m2 * x2) / M
Distance from body 1 = |x_cm - x1|
Distance from body 2 = |x_cm - x2|
The center of mass is the average of the positions weighted by mass. It always lies between the two bodies and is pulled toward the heavier mass. Equal masses put it exactly at the midpoint.
Center of mass facts
- The center of mass is the mass-weighted average position.
- For two positive masses it always lies between them.
- Equal masses place it at the midpoint.
- It is the point that moves smoothly under external forces.
- It is the balance point of the system in a uniform gravity field.
Center of mass: frequently asked questions
What is the center of mass?
The center of mass is the mass-weighted average position of a system. For a set of particles it is the point that moves as if all the mass were concentrated there and all external forces acted there. In one dimension it is the sum of each mass times its position, divided by the total mass.
How is the center of mass of two bodies calculated?
For two masses m1 and m2 at positions x1 and x2, the center of mass is (m1 x1 plus m2 x2) divided by (m1 plus m2). The result always lies on the line between the two bodies, closer to the heavier one.
Is the center of mass always between the two objects?
For two positive masses, yes. The center of mass lies somewhere on the segment joining them, never outside it. It coincides with the midpoint only when the two masses are equal; otherwise it sits closer to the larger mass.
What units should I use?
Use any consistent units. Mass can be in kilograms, grams, or pounds as long as both masses use the same unit, and positions in metres, centimetres, or feet as long as both positions match. The center of mass comes out in the same position unit you entered.
How does this extend to more particles?
For more particles, sum each mass times its position across all particles and divide by the total mass: the center of mass is the sum of m times x over the sum of m. This calculator handles the common two-body case; the same weighted-average idea applies to any number of particles.
Official sources
- NIST: Physical Measurement Laboratory: mass and mechanics.
- NASA: NASA Glenn: center of gravity and mass.
Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.