Center of Mass Calculator

Find the balance point of two particles on a line.

Physics and EnergyUpdated 2026-11-202 min read
Center of Mass Calculator
Center of mass position
...
Total mass...

What it does

The centre of mass of a system is the weighted average of the positions of its parts. For two particles on a line, it lies somewhere between them and shifts toward the heavier one.

University of Rochester physics notes define the centre of mass of two particles using the mass weighted average of their positions. The same idea extends naturally to three dimensions and many particles.

Coimbra University notes give the vector form and show how the relative coordinate and centre of mass coordinate separate the motion of the system from its internal motion.

This tool takes two masses and their positions on a line and returns the centre of mass position and the total mass.

The result uses the same position units you enter. Negative positions are allowed.

How to use

  1. Enter the first mass and its position.
  2. Enter the second mass and its position.
  3. Read the centre of mass position in the main result.
  4. Check the total mass below it.
  5. Try equal masses to see the midpoint.
  6. Move one mass upward and watch the centre shift toward it.

Formula

x_cm = (m1 x1 + m2 x2) / (m1 + m2).
m1, m2
The two masses.
x1, x2
Their positions on a line.
x_cm
Centre of mass position.
total mass
Sum of the two masses.

The engine computes the weighted sum and divides by the total mass. Positions can be negative because the formula depends on the chosen origin.

Worked example

Example: unequal masses

Masses 2 and 3 at positions 0 and 10.

  1. The weighted sum is 2 x 0 + 3 x 10 = 30.
  2. The total mass is 2 + 3 = 5.
  3. Centre of mass = 30 / 5 = 6.
  4. The tool reports centre 6 and total mass 5.
  5. The point is closer to the heavier mass at position 10.
  6. With equal masses the result would be the midpoint at 5.

Reference table

Centre of mass for two masses at 0 and 10
m1m2x_cm
115
236
412
911

Limits

  • The tool handles two particles on a line only.
  • It does not handle continuous bodies or three dimensions.
  • Masses must be positive.
  • Results are shown to eight decimal places.

Common mistakes

  • Averaging the positions without weighting by mass.
  • Using negative masses, which the tool rejects.
  • Forgetting that the origin choice does not affect the physical point.
  • Assuming the centre of mass must be at a particle position.
  • Mixing mass units between the two particles.

Try it yourself

Quick checks. Answers sit tucked under each question.

What is the centre of mass for masses 2 and 3 at 0 and 10?

6.

Where is it for equal masses?

At the midpoint.

Why does it shift toward the heavier mass?

Because that mass carries more weight in the average.

Questions

What is centre of mass?

The mass weighted average position of a system.

What is the formula for two particles?

(m1 x1 + m2 x2)/(m1 + m2).

Can positions be negative?

Yes. They depend on the chosen origin.

Is it the same as centre of gravity?

In a uniform gravitational field, yes.

Does the tool handle three dimensions?

No. It works on a line.

What if masses are equal?

The centre of mass is the midpoint.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.