acalculator

Where is the center of mass?

Type each mass and its position. The center of mass calculator gives the point where the masses balance, its x and y coordinates, and the total mass.

Your numbers

Masses and positions
Row 1
Row 2
Row 3
Leave y at 0 for masses on a line.
Center of mass
(2.2, 1.5)

The center of mass is at (2.2, 1.5).

x of the center
2.2
y of the center
1.5
Total mass
10

Center of mass: (2.2, 1.5). The center of mass is at (2.2, 1.5).

How to calculate

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.

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).

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

  • 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.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Masses and positions 2 0 0; 3 4 0; 5 2 3 gives x of the center 2.2, y of the center 1.5, Total mass 10, Center of mass (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. Masses and positions 1 0; 1 1; 1 2 gives x of the center 1, y of the center 0, Center of mass (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. Masses and positions 5.972e+24 0; 7.346e+22 384400 gives x of the center 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. Masses and positions 3 -2 1; 1 2 -3 gives x of the center -1, y of the center 0, Center of mass (−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

How it works

For masses m₁ … mₙ at positions (x₁, y₁) … (xₙ, yₙ):

  • Total mass: M = m₁ + m₂ + … + mₙ
  • x of the center: x_cm = (m₁x₁ + m₂x₂ + … + mₙxₙ) ÷ M
  • y of the center: y_cm = (m₁y₁ + m₂y₂ + … + mₙyₙ) ÷ M

A blank y counts as 0, so masses on a line need only x. A mass of 0 adds nothing.

Exact arithmetic. Every number is read as the exact decimal you typed, and the sums and the division are exact fractions until the result is rounded for display.

Output format. The headline shows the point as (x, y) with each coordinate to 6 significant figures and a true minus sign (−) for negative values. The x, y and total mass rows show 10 significant figures.

When there is no answer.

  • All masses are 0 (the total mass must be more than 0).
  • A coordinate of the center that is not 0 but is below the smallest number a computer can hold (about 5 × 10⁻³²⁴).

Assumptions

  • Point masses: each row is a point, or the center of mass of a body placed there.
  • 1 to 20 rows; masses 0 to 10³⁰; positions −10¹⁵ to 10¹⁵, all in one unit each.

Worked examples by hand

Three masses in a plane (the default). M = 2 + 3 + 5 = 10. x = (2 × 0 + 3 × 4 + 5 × 2) ÷ 10 = 22 ÷ 10 = 2.2; y = (2 × 0 + 3 × 0 + 5 × 3) ÷ 10 = 1.5. Center (2.2, 1.5).

Three equal masses at 0, 1 and 2. x = (0 + 1 + 2) ÷ 3 = 1. Center (1, 0).

Earth and the Moon (km from Earth’s center). x = (5.972 × 10²⁴ × 0 + 7.346 × 10²² × 384,400) ÷ (5.972 × 10²⁴ + 7.346 × 10²²) = 2.82380 × 10²⁸ ÷ 6.04546 × 10²⁴ = 4,670.95 km.

3 at (−2, 1) and 1 at (2, −3). x = (3 × (−2) + 1 × 2) ÷ 4 = −1; y = (3 × 1 + 1 × (−3)) ÷ 4 = 0. Center (−1, 0).

Other questions people ask

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.