Center of Mass Calculator

Find the mass-weighted average position (center of mass) of up to three point masses on a line, using x-bar = (m1x1 + m2x2 + m3x3) / (m1 + m2 + m3).

Quick Facts

Formula
x-bar = (m1x1 + m2x2 + m3x3) / (m1 + m2 + m3)
The mass-weighted average position; set an unused mass to 0 to solve for just two masses.
Key property
Independent of coordinate origin
Shifting where you measure position from never changes the physical balance point.

Your Results

Calculated
Center of Mass (x-bar)
-
Weighted average position
Total Mass (M)
-
Sum of m1 + m2 + m3
Total Moment
-
Weighted sum m1x1+m2x2+m3x3
Position Within Span
-
% from leftmost to rightmost mass

Ready

Enter three masses and their positions, then press Calculate.

How the Center of Mass Calculator works

The center of mass is the single point where a system of masses would balance perfectly if it were supported there. It is the mass-weighted average position of every object in the system — heavier objects and objects farther from the origin pull the balance point toward them, exactly the way a heavier person sits closer to the pivot on a seesaw to balance a lighter one farther out.

Formula and method

For point masses arranged along a line, the center of mass is:

x-bar = (m1x1 + m2x2 + m3x3) / (m1 + m2 + m3)

where m1, m2, and m3 are the individual masses and x1, x2, and x3 are their positions along the line (measured from any fixed origin you choose — the origin's location does not change where the balance point physically sits). The numerator, m1x1 + m2x2 + m3x3, is called the total moment: it is the sum of each mass multiplied by its position. Dividing the total moment by the total mass gives the weighted-average position, x-bar. The same formula extends to any number of masses — just add more mixi terms to the numerator and more mi terms to the denominator. To find the center of mass in two or three dimensions, apply the formula separately to each coordinate (x, y, and z).

Worked example with the default values: masses of 2 kg, 3 kg, and 5 kg sit at positions 0 m, 4 m, and 10 m. The total mass is 2 + 3 + 5 = 10 kg. The total moment is (2×0) + (3×4) + (5×10) = 0 + 12 + 50 = 62 kg·m. Dividing gives x-bar = 62 / 10 = 6.2 m — closer to the 10 m mass than the 0 m mass, because the 5 kg mass carries the most weight in the average.

Common sources of error

  • Unit mismatch: use one consistent unit for mass (all kg or all lb) and one consistent unit for position (all m or all ft) — mixing units silently distorts the weighted average.
  • Sign of position: positions to the left of your chosen origin should be entered as negative numbers, not zero or a positive value.
  • Rounding early: compute the total moment and total mass at full precision, and only round the final x-bar — rounding each mass or position first compounds error.

Checking your result

The center of mass must always fall between the leftmost and rightmost mass positions — it can never lie outside the span of the system. If you add mass to one side or move a mass farther out, x-bar should shift toward that side. If a result falls outside your input range or moves the wrong direction when you increase a mass, recheck the mass and position values for sign or unit errors.

Applications

Center of mass calculations show up whenever balance matters: engineers use it to keep vehicles, aircraft, and cranes stable; robotics and biomechanics use it to keep a machine or a body from tipping over; sports equipment designers use it to balance bats and rackets; and astronomers use the same formula to find the barycenter — the point two orbiting bodies actually revolve around, which is often inside the larger body rather than at its exact center.

Frequently Asked Questions

What is the center of mass?
The center of mass is the mass-weighted average position of a system of objects — the single point where the system would balance if it were supported there. For point masses along a line it is x-bar = (sum of mi times xi) divided by (sum of mi), where mi is each mass and xi is its position.
What formula does this calculator use?
For three point masses on a line it computes x-bar = (m1x1 + m2x2 + m3x3) / (m1 + m2 + m3), where m1, m2, and m3 are the masses and x1, x2, and x3 are their positions. This is the standard discrete center-of-mass formula; it extends the same way to any number of masses.
Is center of mass the same as center of gravity?
In a uniform gravitational field, such as near Earth's surface over a small area, the two coincide. Center of mass is a purely geometric property based on mass distribution, while center of gravity is where gravity appears to act; they only diverge in a field that varies noticeably across the object.
What if I only have two masses instead of three?
Set the unused mass to 0. A mass of 0 contributes nothing to either the numerator or denominator, so the formula automatically reduces to the two-mass case: x-bar = (m1x1 + m2x2) / (m1 + m2).