Center Of Mass Calculator - 2D and 3D Point-Mass Systems

Use this center of mass calculator to read x_cm, y_cm, and z_cm from any set of 2 to 10 point masses in 2D or 3D, with total mass and a balance-point interpretation.

Center Of Mass Calculator

Pick the dimension that matches the problem. The 3D mode adds a z column for every particle and reports z_cm.

How many particles are in the system (2 to 10). The table will resize to show that many rows. The center of mass of fewer than two particles is just the position of the one particle you entered.

Mass of particle 1 in any consistent unit (kg, g, slug, or unitless).

x-coordinate of particle 1 in the same length unit you will use for the result.

y-coordinate of particle 1.

z-coordinate of particle 1. Used only in 3D mode; the value is kept on the form so switching back to 2D does not lose it.

Mass of particle 2.

x-coordinate of particle 2.

y-coordinate of particle 2.

z-coordinate of particle 2. Used only in 3D mode.

Mass of particle 3.

x-coordinate of particle 3.

y-coordinate of particle 3.

z-coordinate of particle 3. Used only in 3D mode.

Mass of particle 4.

x-coordinate of particle 4.

y-coordinate of particle 4.

z-coordinate of particle 4. Used only in 3D mode.

Mass of particle 5. Leave at 0 to skip when n is less than 5.

x-coordinate of particle 5.

y-coordinate of particle 5.

z-coordinate of particle 5. Used only in 3D mode.

Mass of particle 6. Leave at 0 to skip when n is less than 6.

x-coordinate of particle 6.

y-coordinate of particle 6.

z-coordinate of particle 6. Used only in 3D mode.

Mass of particle 7. Leave at 0 to skip when n is less than 7.

x-coordinate of particle 7.

y-coordinate of particle 7.

z-coordinate of particle 7. Used only in 3D mode.

Mass of particle 8. Leave at 0 to skip when n is less than 8.

x-coordinate of particle 8.

y-coordinate of particle 8.

z-coordinate of particle 8. Used only in 3D mode.

Mass of particle 9. Leave at 0 to skip when n is less than 9.

x-coordinate of particle 9.

y-coordinate of particle 9.

z-coordinate of particle 9. Used only in 3D mode.

Mass of particle 10. Leave at 0 to skip when n is less than 10.

x-coordinate of particle 10.

y-coordinate of particle 10.

z-coordinate of particle 10. Used only in 3D mode.

Results

x_cm
0units
y_cm 0units
z_cm 0units
Total mass 0mass units

What Is Center Of Mass Calculator?

A center of mass calculator finds the single point (x_cm, y_cm[, z_cm]) at which a system of point masses balances. Enter each particle's mass and its (x, y[, z]) coordinates; the tool returns the mass-weighted center, the total mass, and the dimension mode you used.

  • Solve a statics problem: find the balance point of two weights on a beam before computing reactions
  • Check a centroid by hand: verify that an equal-mass system reduces to the arithmetic mean of the positions
  • Set up a 3D body problem: compute the (x_cm, y_cm, z_cm) of a small cluster of masses before integrating over a solid

Every system has exactly one center of mass: the mass-weighted average of every position. Heavier particles pull the answer toward themselves and lighter ones contribute less.

For the analogous geometric problem on a continuous curve, the Center Of Ellipse Calculator reads (h, k) from the general quadratic form, the standard form, or three boundary points.

How Center Of Mass Calculator Works

The tool reads the dimension mode, the particle count, and the mass and position of every active particle, then sums mass-weighted positions along each axis and divides by the total mass.

x_cm = (m1 x1 + m2 x2 + ... + mN xN) / M, y_cm = (m1 y1 + m2 y2 + ... + mN yN) / M, z_cm = (m1 z1 + m2 z2 + ... + mN zN) / M, M = m1 + m2 + ... + mN
  • m_i: Mass of the i-th particle, in any consistent unit (kg, g, slug, or unitless).
  • x_i, y_i, z_i: Position of the i-th particle along each axis. In 2D mode the z column is treated as zero.
  • M: Total mass, equal to the sum of m_i. Divides the coordinate sums so the answer has the same units as the positions.
  • x_cm, y_cm, z_cm: Coordinates of the center of mass. The unique point where the system balances as if all of its mass were concentrated there.

The vector form R_cm = (sum m_i r_i) / (sum m_i) is the same equation applied to each axis, so 1D, 2D, and 3D share a single set of formulas. The 3D toggle adds a z column and a z_cm read; the z column defaults to zero so old inputs are not lost when you switch modes.

Worked example: two-point lever 1 kg at (0, 0) and 3 kg at (4, 0)

m1 = 1, x1 = 0, y1 = 0, m2 = 3, x2 = 4, y2 = 0

M = 1 + 3 = 4. x_cm = (1 * 0 + 3 * 4) / 4 = 3. y_cm = 0.

Center of mass is (3, 0).

The 3 kg weight is three times as heavy as the 1 kg weight, so the balance point sits three-quarters of the way from the lighter mass to the heavier one.

According to Wolfram MathWorld, Center of Mass, the center of mass of N point masses in 3D has components x_cm = (sum m_i x_i) / M, y_cm = (sum m_i y_i) / M, and z_cm = (sum m_i z_i) / M, where M is the total mass.

The mass-weighted sum is the calculation the Weighted Average Calculator runs for values and weights, so a 1D read here matches a one-axis weighted average line for line.

Key Concepts Explained

Four ideas come up every time a center of mass problem is solved by hand.

Mass-weighted average

The center of mass is the average of the positions, with each position weighted by its particle's mass. Heavy particles pull the answer toward themselves; light particles move it less.

Vector form and component form

The vector equation R_cm = (sum m_i r_i) / (sum m_i) collapses into one equation per axis. x_cm, y_cm, and z_cm are the same calculation applied to their own coordinate list.

Centroid as the equal-mass case

When every m_i is the same, the common mass cancels out and the center of mass reduces to the arithmetic mean of the positions, which is the centroid of the point set.

Balance point

The center of mass is the unique point where the system balances as if all of its mass were concentrated there. Place a pivot there and the net torque from gravity is zero.

When the answer needs to be plotted back into the plane, the Coordinate Plane Calculator handles the (x, y) and distance-to-origin reads used to double-check the center of mass visually.

How to Use This Calculator

The fastest path through this center of mass calculator is to pick a dimension, choose how many particles to include, and fill in the table.

  1. 1 Pick the dimension mode: Choose 2D (x, y) for planar problems and 3D (x, y, z) when the system has height or depth. The 3D mode keeps the z column visible at all times.
  2. 2 Set the number of point masses: Use the number field for the particle count (2 to 10). The calculator reads the first n rows of the table and ignores the rest.
  3. 3 Enter the mass and position of each particle: Fill the m_i, x_i, y_i, and z_i cells. Mass can be in any consistent unit; positions must share the same length unit on every axis.
  4. 4 Read the (x_cm, y_cm, z_cm) result: The primary result updates in real time. (x_cm, y_cm) is the 2D read; the z_cm row shows the third coordinate when the dimension mode is 3D.
  5. 5 Check the total mass: M = sum m_i is reported alongside the center. A non-zero total mass is the sanity check that the result is finite.

For a 1 kg mass at (0, 0) and a 3 kg mass at (4, 0), leave the dimension at 2D, set n = 2, and fill row 1 as m1 = 1, x1 = 0, y1 = 0 and row 2 as m2 = 3, x2 = 4, y2 = 0. The center of mass reads (3, 0) with total mass 4 kg, three-quarters of the way from the lighter mass to the heavier one. Raise n to 5 and the same form handles a five-particle cluster.

If you are working the equal-mass case by hand, the Average Calculator confirms the arithmetic-mean step in one read.

Benefits of Using This Calculator

A focused center of mass tool covers several downstream calculations in one read.

  • Any number of particles from 2 to 10: Two-particle levers and ten-particle clusters use the same table, so you do not have to look up a different formula for each case.
  • 2D and 3D in the same form: The mode toggle adds or hides the z column without erasing the existing data, so a 2D problem can be promoted to 3D by changing the dropdown.
  • Total mass reported alongside the center: M = sum m_i sits in the results panel, so you can confirm the system is not accidentally massless before trusting the (x_cm, y_cm, z_cm) read.
  • Equal-mass shortcut is automatic: Enter m1 = m2 = ... and the calculator returns the arithmetic mean of the positions. There is no separate centroid mode to remember.

Use the read as a sanity check on a homework problem or a statics calculation, then spend the time you save on the harder questions.

For the next step on a planar set of vertices, the Polygon Area Calculator reports the enclosed area of the same polygon whose vertices you used for the (x_cm, y_cm) read.

Factors That Affect Your Results

These factors change the read, and a couple are easy to overlook with mixed-up inputs.

Dimension mode

2D mode treats the z column as zero and reports z_cm = 0. 3D mode includes the z column in every sum.

Number of active particles

The center of mass is computed from the first n particles. Rows 5 to 10 are inactive by default and joined in as n increases.

Mass values

Heavy particles pull the center of mass toward themselves. Setting one mass to 0 effectively removes that particle from the weighted average.

Negative masses

The formula accepts negative masses as a modeling device for buoyant forces and net-torque problems. The math works, but a negative mass is not a physical object.

Zero total mass

If the sum of all active masses is zero, the divisor M is zero and the center of mass is undefined. The calculator flags this with a validation error.

  • This tool handles a finite set of point masses; a continuous mass distribution needs an integral that the calculator does not evaluate.
  • The center of mass is a single point and does not describe how the mass is spread around it. For spread and stability, pair this read with a moment-of-inertia or radius-of-gyration calculation.

If the (x_cm, y_cm, z_cm) read does not look right, check the dimension mode, particle count, and total mass first.

According to Wikipedia, Center of mass article, the center of mass of a system of point masses is the unique point R_cm = (sum of m_i r_i) / (sum of m_i), and when every mass is equal the result reduces to the arithmetic mean of the positions.

Center of mass calculator with 2D and 3D inputs that outputs x_cm, y_cm, z_cm and total mass in a black and white analytic-geometry layout.
Center of mass calculator with 2D and 3D inputs that outputs x_cm, y_cm, z_cm and total mass in a black and white analytic-geometry layout.

Frequently Asked Questions

Q: What is the center of mass?

A: The center of mass of a system of particles is the unique point at which the system balances as if all of its mass were concentrated there. It is the mass-weighted average of every position in the system, so heavier particles pull it toward themselves and lighter ones contribute less.

Q: How do I find the center of mass of a system of particles?

A: Multiply each particle's mass by its position to get m_i r_i, sum those products along each axis, and divide by the total mass M = sum m_i. The vector form is R_cm = (sum m_i r_i) / (sum m_i), and the component form is x_cm = (sum m_i x_i) / M, y_cm = (sum m_i y_i) / M, and z_cm = (sum m_i z_i) / M in 3D.

Q: What is the formula for the center of mass in 1D, 2D, and 3D?

A: In 1D the formula is x_cm = (sum m_i x_i) / (sum m_i). In 2D it adds y_cm = (sum m_i y_i) / (sum m_i) with the z column treated as zero. In 3D it also includes z_cm = (sum m_i z_i) / (sum m_i). The vector form R_cm = (sum m_i r_i) / (sum m_i) covers all three cases in one equation.

Q: How is the center of mass different from the centroid?

A: The centroid is the geometric center of a shape, equal to the arithmetic mean of the positions when every particle has the same mass. The center of mass is the mass-weighted average, so it depends on the actual masses. When all masses are equal, the two coincide; when they differ, the center of mass is pulled toward the heavier particles.

Q: Is the center of mass always inside the object?

A: For nonnegative masses, the center of mass always lies inside the convex hull of the positions; a weighted average of points in a convex set stays in that set. A single particle balances at its own position. A hollow ring or U-shape can balance in empty space, but that space is still inside the convex hull, not outside it.

Q: What happens to the center of mass when the masses are equal?

A: When every mass m_i is the same, the common factor cancels and the formula reduces to the arithmetic mean of the positions. The center of mass and the centroid of the point set are the same point, so the system balances at the geometric middle of the cluster.