xcm = (m1x1 + m2x2 + m3x3) / (m1 + m2 + m3)a weighted average of position — the balance point of the masses

Center of mass: the mass-weighted average position of a system — the single point that moves as if all the mass were concentrated there, and the point a system balances about. For point masses on a line, xcm = (m1x1 + m2x2 + m3x3) / (m1 + m2 + m3). This free calculator finds the center of mass, or works backwards to place a mass or size a mass so the system balances at a chosen point.

How to calculate the center of mass

The center of mass is a weighted average of position: multiply each mass by its position, add those products, and divide by the total mass — xcm = (m1x1 + m2x2 + m3x3) / (m1 + m2 + m3). Each mass "pulls" the balance point toward itself in proportion to how heavy it is, so the answer always lands between the outermost masses and leans toward the heavier ones.

To use the tool, place your masses on a common axis and choose an origin (any convenient point — one of the masses is often easiest). Enter each mass in kilograms and each position in metres, using negative values for anything left of the origin. Leave mass 3 at zero for a two-body problem, or fill it in for three. The result is the position of the balance point, in the same length unit you entered.

The two inverse modes answer design questions. Solve for x2 tells you where to place the second mass so the center of mass lands on a target position; solve for m2 tells you what that mass must be. These are the everyday balancing problems — trimming a boat, positioning a counterweight, or loading a shelf evenly. For the rotational cousin of this idea, see the moment of inertia calculator, or the torque calculator for balancing about a pivot; look up a term in the physics glossary.

Worked example

Two masses sit on a line: m1 = 2 kg at x1 = 0 m and m2 = 3 kg at x2 = 2 m, with no third mass. The center of mass is xcm = (2·0 + 3·2) / (2 + 3) = 6 / 5 = 1.20 m — closer to the heavier 3 kg mass, as expected. The inverse modes close the loop: solving for m2 with a target of 1.20 m and x2 = 2 m returns exactly 3 kg, and solving for x2 with a target of 1.20 m and m2 = 3 kg returns exactly 2.00 m.

Why it matters

The center of mass is where an object balances, the point that follows a smooth path even as a body tumbles, and the reference for rotational dynamics and stability. Engineers use it to trim aircraft and ships, place counterweights in cranes and vehicles, design stable furniture and robots, and analyze collisions and explosions — where the center of mass keeps moving as if nothing happened. It is also the point about which gravity exerts no net torque, which is why a well-balanced object rests in any orientation.

Frequently asked questions

What units does the center of mass calculator use?

Masses in kilograms and positions in metres by default (you can switch to grams or centimetres). Because the center of mass is a weighted average of position, any single consistent length unit works — enter every position in the same unit and the answer comes out in that same unit. Only ratios of the masses matter, so the mass unit cancels out.

Can the positions be negative?

Yes. The reference point (the origin of your axis) is arbitrary, so a position simply encodes distance and direction from wherever you place zero. A mass to the left of the origin has a negative position; one to the right is positive. The calculator handles negative positions correctly, and the center of mass will come out with the right sign.

Why does the answer always land between my masses?

Because the center of mass is a weighted average, it can never fall outside the range of the positions you entered — it always lies between the smallest and largest occupied position. Equal masses at two points give the exact midpoint; making one mass heavier pulls the balance point toward it, but never past it.

How do I find where to put a mass so the system balances at a chosen point?

Switch the "Solve for" menu to x2. Enter mass 1, its position, mass 2, and the target center-of-mass position, and the calculator returns the position where mass 2 must sit so the balance point lands exactly on your target. Solve-for m2 instead answers the sister question: what mass, placed at a known spot, moves the balance point to the target.

Is the center of mass the same as the center of gravity?

They coincide whenever gravity is uniform across the system — which is true for any everyday object in a constant gravitational field, so on Earth the two are effectively the same point. They only differ in a non-uniform field (for example, an object tall enough that gravity is measurably weaker at the top), where the center of gravity shifts slightly toward the stronger-field end.

References & formula source

  • Halliday, Resnick & Walker — Fundamentals of Physics, chapter on Center of Mass and Linear Momentum.
  • Young & Freedman — University Physics with Modern Physics, center-of-mass section of the Momentum chapter.
  • Serway & Jewett — Physics for Scientists and Engineers, chapter on Linear Momentum and Collisions.

Embed this calculator

Add this free Center of Mass calculator to your own website — copy the snippet below.