Quick answer
The centre of mass is x_cm = Σ mᵢxᵢ ÷ Σ mᵢ. Masses of 2, 3 and 5 at positions 0, 4 and 10 balance at (0 + 12 + 50) ÷ 10 = 6.2.
Enter masses and x (and optionally y) positions. The calculator returns the centre of mass and total mass. Use this center of mass calculator to check your own figures.
Related tools: Molar Mass Calculator: Molar mass and mass percent composition of a chemical formula. Mass Percent Calculator: Mass percent of a component in a mixture or compound. Average Atomic Mass Calculator: Weighted average of isotope masses.
How to use the Center of Mass Calculator
- Type masses, for example 2, 3, 5.
- Type x positions, for example 0, 4, 10.
- Optionally, type y positions (optional), for example 0, 2, 5.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Masses | Text, such as 2, 3, 5 | — |
| x positions | Text, such as 0, 4, 10 | — |
| y positions (optional) (optional) | Text, such as 0, 2, 5 | — |
Formula and method
Formula
x_cm = Σ mᵢxᵢ ÷ Σ mᵢ
IEEE-754 double precision; shown to the decimals indicated.
Same weighted average for y when given.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Masses = 2, 3, 5; x positions = 0, 4, 10.
| Result | Value |
|---|---|
| Center of mass (x) | 6.2 |
| Center of mass (y) | — |
| Total mass | 10 |
Example 2
Inputs: Masses = 1, 1; x positions = 0, 2; y positions (optional) = 0, 2.
| Result | Value |
|---|---|
| Center of mass (x) | 1 |
| Center of mass (y) | 1 |
| Total mass | 2 |
Example 3
Inputs: Masses = 10, 5, 5; x positions = 1, 2, 3; y positions (optional) = 4, 0, -2.
| Result | Value |
|---|---|
| Center of mass (x) | 1.75 |
| Center of mass (y) | 1.5 |
| Total mass | 20 |
The first line is the headline result (center of mass (x)). Below it the center of Mass Calculator lists center of mass (y) and total mass, which describe the same case from other angles. IEEE-754 double precision; shown to the decimals indicated.
The balance point
The centre of mass is the weighted average of positions. The heavy 5 at position 10 pulls it to 6.2, much closer to it than to the 2 at 0.
Two dimensions
Give y positions as well to get the y coordinate; the calculator shows a dash otherwise. Lists must be the same length. The centre of mass need not lie within any object, such as the hole of a ring.
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- x positions: entering "0" shows "Enter one x position for every mass." beside that field and no result.
- Masses: left empty shows "Enter masses." beside that field and no result.
Choosing between the Center of Mass Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Molar Mass Calculator](/science/molar-mass-calculator/) | chemical formula | Molar mass |
| [Mass Percent Calculator](/science/mass-percent-calculator/) | mass of component and total mass | Mass percent |
| [Average Atomic Mass Calculator](/science/average-atomic-mass/) | isotope masses and abundances | Average atomic mass |
| [Lean Body Mass Calculator](/fitness/lean-body-mass-calculator/) | units, sex and weight | Lean body mass |
| [Dew Point Calculator](/science/dew-point/) | air temperature and relative humidity | Dew point |
Background: gravity, rotation and optics
Gravity and rotation calculations use a few core relations: a circular orbit has speed v = √(GM ÷ r), torque equals moment of inertia times angular acceleration (τ = Iα), and a thin lens obeys 1/f = 1/dₒ + 1/dᵢ. The moment of inertia depends on both the shape and the axis of rotation.
Use SI units (metres, kilograms, seconds) and check the sign conventions of the formula before interpreting a negative result.
Assumptions and limitations
- Lists must be the same length
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for x positions and masses to confirm this.
Frequently asked questions
What is the centre of gravity?
The same point in a uniform gravitational field.
Can it be outside the body?
Yes. The centre of mass can lie outside an object, as with a ring, a boomerang or a high jumper's arched body.
How does it relate to stability?
Lower is more stable.
What does the Center of Mass Calculator calculate?
Center of mass of point masses in one or two dimensions. It returns Center of mass (x), Center of mass (y) and Total mass.
What formula does the Center of Mass Calculator use?
x_cm = Σ mᵢxᵢ ÷ Σ mᵢ. Same weighted average for y when given.
What do I need to enter in the center of Mass Calculator?
You enter Masses and x positions. Optional: y positions (optional).
What is an example of a center of Mass result?
With masses 2, 3, 5 and x positions 0, 4, 10, the center of mass (x) is 6.2.
Related calculators
- Molar Mass Calculator — Molar mass and mass percent composition of a chemical formula.
- Mass Percent Calculator — Mass percent of a component in a mixture or compound.
- Average Atomic Mass Calculator — Weighted average of isotope masses.
- Dew Point Calculator — Dew point from temperature and relative humidity.
- Acceleration Calculator — Average acceleration from change in velocity over time.
Sources
- OpenStax, University Physics Volume 1 (Rice University): mechanics
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.