Center of Mass: Formula and Worked Example
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
Calculate the center of mass by taking each part’s mass times its position, adding those products, and dividing by the total mass. Enter the masses and positions of the objects along one axis; the calculator returns the mass-weighted average position and total mass.
Formula
For objects located along one straight axis, the center of mass is the sum of each mass multiplied by its position, divided by the sum of the masses:
xcm = (m1x1 + m2x2 + … + mnxn) / (m1 + m2 + … + mn)
- m is a mass, in kilograms (kg), grams (g), pounds-mass (lbm), or another consistent mass unit.
- x is a position measured from a chosen origin, in metres (m), centimetres (cm), feet (ft), or another consistent length unit.
- xcm is the center-of-mass position, in the same length unit as the positions.
- n is the number of objects or mass elements being included.
The calculator uses two objects: xcm = (m1x1 + m2x2) / (m1 + m2). The total mass is M = m1 + m2.
Worked Example
Using the calculator’s default inputs, object 1 has a mass of 2 kg at position 0 m, and object 2 has a mass of 3 kg at position 4 m.
- Multiply each mass by its position: (2 kg × 0 m) + (3 kg × 4 m) = 0 kg·m + 12 kg·m = 12 kg·m.
- Add the masses: 2 kg + 3 kg = 5 kg.
- Divide the weighted position sum by the total mass: 12 kg·m ÷ 5 kg = 2.4 m.
Center of mass: 2.40 m. Total mass: 5.00 kg. The result lies closer to the heavier object at 4 m than to the lighter object at 0 m.
How to Calculate It for More Objects
For three or more objects, include every mass-position product in the numerator and every mass in the denominator. For example, three objects use xcm = (m1x1 + m2x2 + m3x3) / (m1 + m2 + m3). The same method works for many small components or for a body divided into sections, provided each section’s mass and representative position are known.
For an object with continuously distributed mass, the corresponding definition is xcm = (1/M) ∫x dm, where dm is a small element of mass and the integral covers the whole object. If density and shape are uniform and symmetric, the center of mass is often at the geometric center. For an irregular object, calculate it from the mass distribution or determine it experimentally.
Coordinates, Units, and Interpretation
In two or three dimensions, calculate each coordinate separately using the same mass weighting:
xcm = Σmixi/Σmi, ycm = Σmiyi/Σmi, zcm = Σmizi/Σmi.
Choose a coordinate origin and direction, then record every position relative to that same reference. Positions may be negative if they lie on the negative side of the origin. The answer’s units are units of length, not mass. Mass units must match one another, and position units must match one another; for example, do not combine kilograms with pounds or metres with inches without converting first. US customary examples include pounds-mass and feet; metric examples include kilograms and metres.
The center of mass is a weighted average, not necessarily the midpoint between the objects. With positive masses, its position lies between the smallest and largest input positions. Moving the origin shifts all coordinates, including the answer, by the same amount; the physical location does not change.
When It Is Useful and Common Errors
Center of mass calculations help describe how a collection of parts moves and where its mass is balanced. In mechanics, an object’s translational motion can often be analyzed as though its total mass were concentrated at its center of mass, while its rotation still depends on how mass is distributed around that point. It is also useful when estimating balance for connected components or comparing the mass distribution of different arrangements.
- Forgetting to weight positions: A plain average of positions is correct only when all masses are equal.
- Using inconsistent units: Convert all masses to one unit and all coordinates to one unit before calculating.
- Mixing reference points: Measure every position from the same origin, with a consistent positive direction.
- Rounding too early: Keep extra digits during intermediate calculations, then round the final position to appropriate precision.
- Leaving out parts: Include every component that contributes meaningfully to the system’s mass.
The two-object calculator assumes positive masses and positions along a single axis. It does not determine the positions or masses for you, and its answer is only as accurate as those inputs. A more detailed model may be needed when mass is distributed continuously, components change shape, or the system’s mass distribution varies over time.
Frequently Asked Questions
What is the center of mass in simple terms?
It is the position that represents the average location of a system’s mass, with heavier parts influencing the result more than lighter parts.
How do I calculate center of mass with two objects?
Multiply each object’s mass by its position, add the products, and divide by the sum of the two masses: (m1x1 + m2x2)/(m1 + m2).
Is center of mass always at the center of an object?
No. It is at the geometric center for many uniform, symmetric objects, but uneven density or an irregular shape can shift it. It can even lie outside the material, as it does for a ring.
Can the center of mass be outside the object?
Yes. The center of mass is a point describing the mass distribution, not necessarily a point occupied by material. A uniform ring is a familiar example: its center of mass is at the empty center.
What is the difference between center of mass and center of gravity?
Center of mass describes how mass is distributed. Center of gravity is the point where the net gravitational force can be treated as acting. In a nearly uniform gravitational field, such as the field near Earth’s surface, the two points coincide.
Does changing the origin change the center of mass?
The numerical coordinate changes by the same shift applied to every position, but the physical point remains unchanged. Consistent coordinates are essential when interpreting the result.
Related
Formula used
in m1 | Mass 1 | kg | 2 | 0 in x1 | Position 1 | m | 0 | in m2 | Mass 2 | kg | 3 | 0 in x2 | Position 2 | m | 4 | out x | Center of mass | m | (m1*x1 + m2*x2) / (m1 + m2) | 2 out M | Total mass | kg | m1 + m2 | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.