Center of Mass Calculator
Enter each point mass and its position, one per line, as: mass, x, y
For 1D problems, just use: mass, x (leave y out).
–
Center of mass calculator
This calculator finds the centre of mass (also called the centre of gravity) of a system of point masses. Enter each mass and its position — in one dimension (mass, x) or two dimensions (mass, x, y) — and it returns the coordinates of the balance point of the whole system.
How it is calculated
The centre of mass is the mass-weighted average of all the positions: x_cm = Σ(mᵢxᵢ) ÷ Σmᵢ, and the same for the y-coordinate. In other words, each position is weighted by its mass, so heavier objects pull the centre of mass towards them. The calculator sums the moments (mass × position) and divides by the total mass.
Where it is used
The centre of mass is fundamental in physics and engineering — it determines how objects balance, rotate, and respond to forces. A system behaves, for many purposes, as though all its mass were concentrated at this single point. For force and motion calculations, see our physics calculator.
How to calculate center of mass by hand: a worked example
Take three point masses: 2 kg at the origin (0, 0), 3 kg at (4, 0), and 5 kg at (2, 6). First, find the total mass: 2 + 3 + 5 = 10 kg. Second, find the total moment in x: multiply each mass by its x-position and add them up: (2 x 0) + (3 x 4) + (5 x 2) = 0 + 12 + 10 = 22. Third, divide by the total mass: 22 / 10 = 2.2. That is the x-coordinate of the center of mass.
Repeat the same steps for y: (2 x 0) + (3 x 0) + (5 x 6) = 30, then 30 / 10 = 3.0. So the center of mass of this system sits at (2.2, 3.0) — closer to the 5 kg mass than the other two, because a heavier point pulls the balance point toward itself. Enter the same three lines into the calculator above (2, 0, 0 then 3, 4, 0 then 5, 2, 6) and it returns the identical result instantly.
Frequently asked questions
Can the centre of mass be outside the object?
Yes. For shapes like a ring or a boomerang, the centre of mass can lie in empty space where there is no material at all. The object still balances about that point, which is why a ring hangs level from a string tied at its centre.
Is centre of mass the same as centre of gravity?
In a uniform gravitational field, such as near the surface of the Earth, they are at the same point, so engineers and students usually treat them as identical. They only differ for very large objects, like a tall tower or a planet, where gravity is noticeably stronger at one end than the other.
Does the unit of mass matter?
No, as long as every mass uses the same unit. Grams, kilograms or pounds all give the same position, because the unit cancels when you divide the total moment by the total mass. Positions must also share one unit, such as metres or centimetres, and the answer comes out in that unit.
Can masses have negative coordinates?
Yes. Coordinates can be negative, and the calculator handles them normally. Masses, however, should always be positive. The one exception is the “negative area” trick for shapes with holes, explained below.
The center of mass formula
For a set of point masses m1, m2, m3 and so on, sitting at positions x1, x2, x3, the centre of mass along the x-axis is:
x_cm = (m1·x1 + m2·x2 + m3·x3 + …) ÷ (m1 + m2 + m3 + …)
The same formula is applied separately to y (and to z in three dimensions). Each product m·x is called a moment. The centre of mass is simply the total moment divided by the total mass, which is why it is often described as a weighted average of position.
Worked example in one dimension: a seesaw
A child of 30 kg sits at one end of a 3 m seesaw plank (x = 0) and an adult of 45 kg sits at the other end (x = 3 m). Ignoring the plank’s own mass:
- Total mass: 30 + 45 = 75 kg.
- Total moment: (30 × 0) + (45 × 3) = 135 kg·m.
- Centre of mass: 135 ÷ 75 = 1.8 m from the child.
To balance, the pivot would need to sit 1.8 m from the child and 1.2 m from the adult, which matches everyday experience: the heavier person sits closer to the pivot. In the calculator, enter 30, 0 on the first line and 45, 3 on the second.
Composite shapes: splitting into rectangles
For a flat plate of uniform thickness (a lamina), area does the job of mass. Split the shape into simple pieces, find the centre of each piece, then treat each piece as a point mass equal to its area.
Take an L-shaped plate made of two rectangles. Rectangle A runs from x = 0 to 4 and y = 0 to 1, so its area is 4 and its centre is (2, 0.5). Rectangle B runs from x = 0 to 1 and y = 1 to 4, so its area is 3 and its centre is (0.5, 2.5).
- x_cm = (4 × 2 + 3 × 0.5) ÷ 7 = 9.5 ÷ 7 = 1.357
- y_cm = (4 × 0.5 + 3 × 2.5) ÷ 7 = 9.5 ÷ 7 = 1.357
The centre of mass is at about (1.36, 1.36), which lies on the shape’s line of symmetry, as it should. Enter 4, 2, 0.5 and 3, 0.5, 2.5 in the calculator to check. For a shape with a hole, treat the hole as a piece with negative area and the same method still works.
Centre of mass of common shapes
For solid objects of uniform density, these standard results save a lot of integration. They are the positions used in A-Level Mechanics and first-year engineering courses.
| Shape | Centre of mass position |
|---|---|
| Uniform rod, length L | L/2 from either end |
| Rectangle or square | Where the diagonals cross |
| Triangle | Where the medians meet, one third of the height above the base |
| Semicircular lamina, radius r | 4r ÷ 3π (about 0.424r) from the straight edge |
| Semicircular arc (wire), radius r | 2r ÷ π (about 0.637r) from the centre |
| Solid hemisphere, radius r | 3r/8 from the flat face |
| Hemispherical shell, radius r | r/2 from the flat face |
| Solid cone, height h | h/4 above the base |
Continuous objects and integration
When mass is spread continuously, the sums become integrals: x_cm = (∫ x dm) ÷ (∫ dm). For a rod whose density changes along its length, you write dm = λ(x) dx, where λ is mass per unit length, and integrate over the rod. In practice you can approximate any continuous object with this calculator by splitting it into many small pieces and entering each as a point mass; the more pieces you use, the closer you get to the exact answer. The Simpson’s rule calculator is useful for evaluating the integrals numerically.
Why the centre of mass matters
- Stability: an object topples when its centre of mass moves outside its base. Low, wide vehicles and furniture are harder to tip for this reason.
- Vehicle and aircraft loading: pilots and HGV drivers must keep the loaded centre of mass inside set limits, or handling becomes dangerous.
- Sport: high jumpers using the Fosbury flop can clear the bar while their centre of mass passes just below it.
- Space and orbits: the Earth and Moon both orbit their shared centre of mass, which lies inside the Earth about 4,700 km from its centre.
For related problems, try the physics calculator, the trigonometry calculator for resolving positions at angles, or the A-Level maths tools.
