HomeMath › Center of Mass Calculator

Center of Mass Calculator

Find the balance point of up to three point masses. Enter each mass and its x, y coordinates in any consistent units (kg with meters, grams with centimeters) — set an unused mass to 0 to work with just two points, or set every y to 0 for a 1-D problem.

Example: with Mass 1 2 · x₁ position 0 · y₁ position 0 · Mass 2 4 · x₂ position 6 → Center of mass (x̄, ȳ): (3.75, 1).

  • Total mass M8
  • x̄ worked outx̄ = 30 / 8 = 3.75
  • ȳ worked outȳ = 8 / 8 = 1

Computed by the calculator below using its default values. Change any input to see your own numbers.

Center of mass (x̄, ȳ)
Total mass M
x̄ worked out
ȳ worked out

x̄ = Σmᵢxᵢ / Σmᵢ and ȳ = Σmᵢyᵢ / Σmᵢ — each coordinate of the center of mass is a mass-weighted average of the positions.

Why the center of mass is a weighted average

The center of mass is the point where an object or system would balance. For point masses, each coordinate is a weighted average: multiply every mass by its position, add them up, and divide by the total mass. Heavy pieces pull the balance point toward themselves in exact proportion to their mass — a 4 kg mass tugs twice as hard as a 2 kg one at the same distance.

That is why two equal masses balance at their midpoint, while a 3-to-1 pair balances a quarter of the way from the heavy one. The result does not depend on your units, only on consistency: kilograms and meters, grams and centimeters, even pounds and feet all give the same balance point in their own coordinates.

From seesaws to spacecraft

The same sum runs a surprising range of calculations: where to put the fulcrum under a loaded beam, how cargo placement shifts a truck's axle loads, and where a spacecraft's thrusters must point so a burn does not induce a tumble. In orbit mechanics, the Earth-Moon system revolves around their common center of mass — a point about 4,670 km from Earth's center, still inside the planet, because Earth is 81 times heavier.

How it’s calculated

x̄ = (m₁x₁ + m₂x₂ + m₃x₃) / M and ȳ = (m₁y₁ + m₂y₂ + m₃y₃) / M, where M = m₁ + m₂ + m₃. Masses must be non-negative and M > 0. Coordinates may be negative. Results are rounded to 6 significant figures (display max 4 decimals).

Point masses only — for extended rigid bodies you integrate over the shape, though any object can be reduced to a point mass at its own center of mass first and then combined with this formula.

Where two masses balance

Mass ratio m₁ : m₂Balance point (from m₁ toward m₂)
1 : 1Halfway (50%)
2 : 11/3 of the way (33.3%)
3 : 11/4 of the way (25%)
4 : 11/5 of the way (20%)
9 : 11/10 of the way (10%)

Computed with x̄ = Σmᵢxᵢ / Σmᵢ: with m₁ at 0 and m₂ at distance d, the balance point sits at m₂d / (m₁ + m₂).

Common mistakes

  • Averaging the positions without weighting by mass — that gives the centroid, which only equals the center of mass when all masses are equal.
  • Mixing units, like meters for one point and centimeters for another; the weighted average silently blends them into nonsense.
  • Dropping the sign on coordinates left of the origin or below the x-axis — negative positions are fine and must stay negative in the sum.
  • Forgetting to divide by the total mass, which returns the moment (Σmx) instead of the balance coordinate.

Frequently asked questions

What is the center of mass formula?

For point masses: x̄ = Σmᵢxᵢ / Σmᵢ, and the same pattern for ȳ. Multiply each mass by its coordinate, sum, and divide by total mass. This calculator handles up to three masses in two dimensions.

What units should I use?

Any, as long as they are consistent: all masses in one unit and all positions in one unit. The center of mass comes out in the same position unit you entered.

Is the center of mass the same as the centroid?

Only when mass is spread uniformly. The centroid is the geometric average of positions; the center of mass weights each position by its mass, so a heavy corner drags it off the centroid.

Can I use this for a 1-D problem, like masses on a beam?

Yes — enter the positions along the beam as x values and set every y to 0. The x̄ output is the balance point of the beam.

Can the center of mass be outside the objects?

Yes. Two separated masses balance at a point in the empty space between them, and a ring's center of mass is in the hole. Nothing physical needs to sit at the balance point.