What this calculator does
The centre of mass of a system is the single balance point where the whole collection of masses behaves as if it were concentrated in one spot. For a set of point masses scattered around a plane, it is found with the centre of mass equation, a weighted average where each position is weighted by its own mass rather than counted equally.
This is a different calculation from a plain geometric centre. Three vertices of a triangle spaced evenly give a centroid, an unweighted average of position alone. Give those same three points different masses, and the balance point shifts toward whichever one is heaviest, which is exactly what this centre of mass calculator works out.
The formula
For each mass, multiply its x position by its mass, and separately multiply its y position by its mass. Add those products up, then divide by the total mass. That gives the x and y coordinates of the point where the whole system balances, in both directions independently.
| Term | Meaning |
|---|---|
| x̄, ȳ | The coordinates of the centre of mass in the x and y directions. |
| mᵢ | The mass of point i in the system. |
| xᵢ, yᵢ | The position of point i. |
The inputs explained
| Field | What to enter |
|---|---|
| Masses (comma separated) | A comma-separated list of masses, in any consistent unit, one per point. |
| x positions (comma separated) | The x position of each mass, in the same order as the mass list. |
| y positions (comma separated) | The y position of each mass, in the same order as the mass list. |
When to use it
Balancing an irregular load
Several weights bolted to a frame at different points need a single balance point worked out before the frame is lifted or mounted, so it does not tip.
Checking a two-body approximation
A system that is close to two dominant masses, such as a planet and a moon, can be checked against the simpler two-body centre of mass figure to see how close the two answers land.
Teaching the difference between centroid and centre of mass
Giving the same triangle vertices equal masses reproduces the plain centroid, then changing one mass shows exactly how the balance point moves toward the heavier point.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
Centre of mass for three points as one mass increases
The first two masses are held at 2 kg and 3 kg while the third mass, at (6,-1), increases.
| Masses (kg) | Centre of mass (x) | Centre of mass (y) | Total mass |
|---|---|---|---|
| 2, 3, 1 | 3.000 | 0.8333 | 6.000 |
| 2, 3, 3 | 3.750 | 0.3750 | 8.000 |
| 2, 3, 5 | 4.200 | 0.1000 | 10.000 |
| 2, 3, 8 | 4.615 | -0.1538 | 13.000 |
| 2, 3, 12 | 4.941 | -0.3529 | 17.000 |
| 2, 3, 20 | 5.280 | -0.5600 | 25.000 |
Centre of mass with all masses equal, versus the plain centroid
With every mass set to the same value, the weighted average collapses to the plain average of the positions, the same result as a triangle centroid.
| Equal mass (kg) | Centre of mass (x) | Centre of mass (y) |
|---|---|---|
| 1, 1, 1 | 3.333 | 0.3333 |
| 2, 2, 2 | 3.333 | 0.3333 |
| 5, 5, 5 | 3.333 | 0.3333 |
| 10, 10, 10 | 3.333 | 0.3333 |
Questions
How is this different from a triangle centroid?
A centroid, as used for a triangle, is an unweighted average of the vertex positions alone. Centre of mass weights each position by its own mass, so it only matches the centroid when every mass in the system happens to be equal.
Can I use this for more than three masses?
Yes. The formula extends to any number of point masses; enter as many values as needed in the masses, x and y lists, keeping the same order across all three.
What if my masses are along a single line rather than a plane?
Set every y value to the same number, such as 0, and the calculator will return that same value for the y coordinate, leaving the x coordinate as the one-dimensional balance point.
Does the unit of mass or distance matter?
Only that it stays consistent. Any mass unit and any distance unit will do, as long as every entry uses the same one, since the calculation is a ratio of weighted sums.
For the special case of a triangle with no masses involved, see the triangle centroid calculator. For a simpler two-mass system along a single line, see the two-body centre of mass calculator.