# Where is the center of mass?

Finds the center of mass of up to 20 point masses on a line or in a plane: x = Σmx ÷ Σm and y = Σmy ÷ Σm, with the total mass.

- Page: https://www.acalculator.org/physics/center-of-mass-calculator
- JSON spec: https://www.acalculator.org/physics/center-of-mass-calculator.json
- Version: 7b5202428d37

## Default answer

Example with the default inputs (Masses and positions [Mass 2, x 0, y 0; Mass 3, x 4, y 0; Mass 5, x 2, y 3]): The center of mass is at (2.2, 1.5).

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| items | Masses and positions | One row per mass, with its position. Use the same mass unit and the same length unit in every row. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| center | Center of mass | The point (x, y) where the masses balance, to 6 significant figures. |
| x | x of the center | Σ m·x ÷ Σ m. |
| y | y of the center | Σ m·y ÷ Σ m. |
| total | Total mass | All the masses added up, Σ m. |

## Method

x_cm = Σ mⱼ xⱼ ÷ Σ mⱼ; y_cm = Σ mⱼ yⱼ ÷ Σ mⱼ.

## Assumptions

- Each mass is a point (or the center of mass of a body) at the position typed.
- All masses use one unit and all positions one length unit; the center comes out in that length unit.

## Worked examples

1. items = {"mass":2,"x":0,"y":0} or {"mass":3,"x":4,"y":0} gives x = 2.2, y = 1.5, total = 10, center = (2.2, 1.5). Source: OpenStax, University Physics Volume 1, §9.6 Center of Mass (r_CM = Σ mⱼ rⱼ ÷ M), https://openstax.org/books/university-physics-volume-1/pages/9-6-center-of-mass.
2. items = {"mass":1,"x":0} or {"mass":1,"x":1} gives x = 1, y = 0, center = (1, 0). Source: OpenStax, University Physics Volume 1, §9.6 Center of Mass (r_CM = Σ mⱼ rⱼ ÷ M), https://openstax.org/books/university-physics-volume-1/pages/9-6-center-of-mass.
3. items = {"mass":5.972e+24,"x":0} or {"mass":7.346e+22,"x":384400} gives x = 4,670.947124. Source: OpenStax, University Physics Volume 1, §9.6 Center of Mass (r_CM = Σ mⱼ rⱼ ÷ M), https://openstax.org/books/university-physics-volume-1/pages/9-6-center-of-mass; NASA Earth and Moon fact sheets (masses, 384,400 km), https://nssdc.gsfc.nasa.gov/planetary/factsheet/earthfact.html.
4. items = {"mass":3,"x":-2,"y":1} or {"mass":1,"x":2,"y":-3} gives x = -1, y = 0, center = (−1, 0). Source: OpenStax, University Physics Volume 1, §9.6 Center of Mass (r_CM = Σ mⱼ rⱼ ÷ M), https://openstax.org/books/university-physics-volume-1/pages/9-6-center-of-mass.

## FAQ

### How do you find the center of mass?

Multiply each mass by its position, add these up, and divide by the total mass: x = Σ m x ÷ Σ m, and the same for y. Masses 2, 3 and 5 at (0, 0), (4, 0) and (2, 3) balance at x = (0 + 12 + 10) ÷ 10 = 2.2 and y = 15 ÷ 10 = 1.5.

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

In a uniform gravity field, yes. They differ only for very large objects where gravity changes across the object.

### What units should I use?

Any, as long as all masses use the same unit and all positions use the same length unit. The center comes out in that length unit; the mass unit cancels.

### Where is the center of mass of the Earth and the Moon?

About 4,671 km from Earth’s center, inside the Earth (its radius is 6,371 km): 7.346 × 10²² × 384,400 ÷ (5.972 × 10²⁴ + 7.346 × 10²²). Both bodies orbit this point.

### Can the center of mass be outside the object?

Yes. A ring or a boomerang has its center of mass in empty space. For point masses, the center always lies inside the smallest shape that holds all of them.

## Sources

- OpenStax, University Physics Volume 1, §9.6 Center of Mass (r_CM = (1/M) Σ mⱼ rⱼ). https://openstax.org/books/university-physics-volume-1/pages/9-6-center-of-mass (retrieved 2026-10-03)
- NASA, Earth Fact Sheet (mass 5.9722 × 10²⁴ kg) and Moon Fact Sheet (mass 0.07346 × 10²⁴ kg, mean distance 384,400 km). https://nssdc.gsfc.nasa.gov/planetary/factsheet/earthfact.html (retrieved 2026-10-03)
