A center of mass calculator finds the point where a set of masses balances. Enter each mass with its position, in one, two or three dimensions, and the calculator gives the center of mass and the total mass. If all the masses are equal, it gives the centroid of the points. It uses the definition on Wikipedia's page on the center of mass, and it works in your browser. It also works as a centroid calculator for points.
How to use the center of mass calculator
- Choose whether each line has a mass and its coordinates, or coordinates only for equal masses.
- Type one point on each line. Separate the numbers by spaces or commas.
- Press Find the center of mass.
- Read the center, the total mass and the number of points.
The definition
The Wikipedia page on the center of mass defines it for a set of particles as the sum of each mass times its position, divided by the total mass. For two particles it is the mass of the first times its position plus the mass of the second times its position, divided by the sum of the masses. The same formula works in one, two or three dimensions, applied to each coordinate separately. The center of mass lies between the particles, and it is closer to the heavier one.
Worked examples
Take a mass of 2 kilograms at x equal to 0 and a mass of 3 kilograms at x equal to 5. The center of mass is at 3 times 5 plus 2 times 0, divided by 5, which is 3. For the three masses of 1 kilogram at (0, 0), 2 kilograms at (3, 0) and 1 kilogram at (0, 6), the total mass is 4, the x coordinate is 6 divided by 4, which is 1.5, and the y coordinate is 6 divided by 4, which is also 1.5. In three dimensions, 1 kilogram at (1, 2, 3) and 3 kilograms at (5, 6, 7) give a center of mass at (4, 5, 6).
Equal masses and the centroid
If all the masses are the same, the weights cancel and the center of mass is the plain average of the coordinates. This is the centroid of the set of points. For the corners (0, 0), (6, 0) and (0, 3), the average is (2, 1), which is the centroid of that triangle. The centroid of a solid shape is not always the average of its corners, so for a polygon, use the irregular polygon calculator on this site, which uses the area-weighted formula.
Center of mass and balance
The center of mass is the point at which a system balances. If you support a stiff, light board with masses on it at that point, it stays level. This is why it matters in the design of vehicles, where a low center of mass makes a car harder to tip over, and in sports and in the loading of ships and aircraft, where it must lie within safe limits. The calculator is a first step, and in real cases the mass of the supporting structure counts as well.
Choosing the format
For masses with coordinates, the first number of each line is the mass, and the others are the coordinates. A line with two numbers is a mass at one position on a line, with three numbers it is a mass in the plane, and with four numbers it is a mass in space. For equal masses, a line has only the coordinates, with one, two or three numbers. Mixing lines with different numbers of coordinates gives an error message.
A seesaw example
Two children sit on a seesaw that is 4 meters long, with the middle at 0. A child of 30 kilograms sits at −2 meters, at one end, and a child of 40 kilograms sits at +1.5 meters. Enter the lines 30 −2 and 40 1.5. The total mass is 70 kilograms, and the center of mass is at 40 times 1.5 minus 30 times 2, divided by 70, which is 0. The seesaw balances at its middle, which is what the calculator shows.
A group of objects on a table
Suppose four objects lie on a table, with masses of 1, 2, 3 and 4 kilograms at the points (0, 0), (1, 0), (1, 1) and (0, 1). The total mass is 10, the x coordinate of the center of mass is 2 plus 3, divided by 10, which is 0.5, and the y coordinate is 3 plus 4, divided by 10, which is 0.7. The center is at (0.5, 0.7), a little closer to the heavy objects at the top of the square than to the light ones at the bottom.
Adding a part to a body
You can use the calculator to find the new center of mass when you add a part to a body. Treat the body as one point at its own center of mass, with its total mass, and add the new part as a second point. This is how engineers work out how a load changes the balance of a vehicle, a boat or a crane, and the same method applies to a person who carries a backpack.
Limits of the point model
The calculator treats every mass as a single point. For a solid object, you can split it into pieces, find the center of each piece, and enter the pieces as points with their masses. The smaller the pieces, the closer the result comes to the exact center of the object. For shapes with a known formula, such as a triangle or a rod, the centroid has a simple value that you can enter directly as a point.
Common mistakes
- Putting the mass in the wrong place. In the mass format it comes first.
- Mixing one, two and three coordinates. Use the same number on every line.
- Using negative masses. A mass cannot be below zero.
- Mixing units. Use one unit for mass and one for length.
What next
Use this often? Add Center of Ma to your Home screen.
Frequently asked questions
What is a center of mass calculator?
A tool that finds the point where a set of masses balances, from their masses and positions.
What is the formula?
R = Σ(mᵢ × rᵢ) ÷ Σ mᵢ, applied to each coordinate. Two masses of 2 kg at 0 and 3 kg at 5 give a center at 3.
How is the centroid different?
The centroid of points is the center of mass when all the masses are equal. It is the plain average of the coordinates.
Does it work in 3 dimensions?
Yes. Use lines with a mass and three coordinates, or with three coordinates only for equal masses.
Is the center of mass the same as the center of gravity?
In a uniform gravitational field they are the same point.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.