Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Center of Mass x̄
m
measured from the x = 0 end of the rod
Position Breakdown
Rod length (L) m
Center of mass (x̄) m
Position along the rod (x̄ / L) (%)
Distance from the far end (L − x̄) m

What the Thin Rod Center of Mass Calculator does

This calculator finds the center of mass of a thin, straight rod of length L, measured from the end of the rod at x = 0. It supports two cases. For a uniform rod (constant density), the center of mass sits exactly at the midpoint, L/2. For a rod with linearly varying density, described by λ(x) = λ₀ + kx, the calculator integrates the density distribution to locate the exact balance point, and also reports the rod's total mass, the density at the far end, and how far along the rod (as a fraction and percentage of L) the center of mass lies.

How to use it

  1. Choose the rod type: Uniform density or Linearly varying density.
  2. Enter the rod length L. The labels use meters, but any length unit works — the answer comes out in the same unit you enter.
  3. For a linearly varying rod, enter λ₀, the linear density at the x = 0 end (in kg/m), and k, the density gradient (in kg/m²). Use a negative k for a rod that gets lighter along its length; the density must stay non-negative over the whole rod.
  4. Press Calculate. The main result is the center-of-mass position x̄ measured from the x = 0 end, together with the total mass and position breakdown for non-uniform rods.

The formula explained

For any thin rod lying along the x-axis from 0 to L with linear mass density λ(x), the center of mass is the mass-weighted average position:

$$\bar{x} = \frac{\int_0^L x\,\lambda(x)\,dx}{\int_0^L \lambda(x)\,dx}$$

Uniform rod. When λ is constant it cancels out of the ratio, leaving the familiar midpoint result:

$$\bar{x} = \frac{L}{2}$$

Linearly varying density. With λ(x) = λ₀ + kx, the denominator (the total mass M) and the numerator (the first moment of mass about x = 0) both integrate in closed form:

$$M = \int_0^L (\lambda_0 + kx)\,dx = \lambda_0 L + \frac{kL^2}{2}$$ $$\int_0^L x\,(\lambda_0 + kx)\,dx = \frac{\lambda_0 L^2}{2} + \frac{kL^3}{3}$$

Dividing the first moment by the mass gives the center of mass:

$$\bar{x} = \frac{\dfrac{\lambda_0 L^2}{2} + \dfrac{kL^3}{3}}{\lambda_0 L + \dfrac{kL^2}{2}} = \frac{L\,(3\lambda_0 + 2kL)}{3\,(2\lambda_0 + kL)}$$

When k > 0 the rod is heavier toward x = L, so x̄ lands past the midpoint; when k < 0 it shifts toward x = 0. Setting k = 0 collapses the expression back to L/2, as it must.

Advertisement

Worked example

Take a rod of length L = 2 m whose density grows from λ₀ = 2 kg/m at one end with gradient k = 3 kg/m², so λ(x) = 2 + 3x and the far end has density 2 + 3·2 = 8 kg/m.

Total mass: M = λ₀L + kL²/2 = 2·2 + 3·(2)²/2 = 4 + 6 = 10 kg.

First moment: λ₀L²/2 + kL³/3 = 2·(2)²/2 + 3·(2)³/3 = 4 + 8 = 12 kg·m.

Center of mass: x̄ = 12 / 10 = 1.2 m from the light end — that is 60% of the way along the rod, past the midpoint at 1 m, exactly as expected for a rod that is heaviest at the far end.

Frequently asked questions

Why is the center of mass of a uniform rod at L/2? By symmetry: every small mass element at a distance d on one side of the midpoint is matched by an identical element at distance d on the other side, so their contributions to the weighted average cancel and the balance point falls exactly at the middle.

Can the density gradient k be negative? Yes. A negative k describes a rod that gets lighter from x = 0 toward x = L, which pulls the center of mass toward the x = 0 end. The only restriction is physical: λ(x) = λ₀ + kx must stay non-negative over the whole rod, so λ₀ + kL ≥ 0 is required.

What does "thin rod" mean here? It is the standard one-dimensional idealization: the rod's cross-section is small compared with its length and uniform along it, so all the mass can be treated as distributed along a line. The result then gives the position of the center of mass along the rod's axis.

Last updated: