Center of Gravity Calculator (Multiple Masses)
The center of gravity (or centroid) of a system of several masses is the point where you could concentrate the entire mass without changing the balance of the whole. It's a weighted average of the positions, each mass pulling according to its value: a heavy mass sitting far from the group drags the center of gravity toward it.
Enter your masses with their position — one per line, mass, x for a system along an
axis or mass, x, y for a system in a plane — no fixed unit: metres, centimetres,
whatever you like, as long as every position uses the same one.
The masses
Asterisked terms are defined in the glossary below the article body.
Center of gravity, center of mass, centroid: the nuances between these three terms
Drawings, CAD reports and shop talk swap these three labels as if they named one point. They do not, even when that point happens to sit in the same place.
- The centroid* is geometry. It is the average of a set of points, weighted by length, area or volume, and mass does not enter. A triangular plate and a triangular hole share a centroid; only one of them has mass.
- The center of mass* is that same average, weighted by mass. For translation, the body behaves as if the whole mass sat there. Density, ballast, a lead insert: those shift it. The outline alone does not.
- The center of gravity* is where the resultant of the weights acts. On the workshop floor g is uniform, and the center of gravity coincides with the center of mass. In a field that changes with height or direction, the two points split.
A homogeneous part in uniform gravity puts all three names on the same point, and the shop may use them interchangeably. Change the density — a foam core, a welded-on lump, a water tank that is half empty — and the volume centroid stays put while the center of mass shifts. This page computes the mass-weighted average of point masses and reports the center of mass, which on Earth is the center of gravity. The centroid reported by CAD for a solid body is that same point only when the material is uniform. A surface centroid taken from a sketch is not a mass property at all.
Center of mass and center of gravity remain one point until the body leaves the Earth's surface, or until the body itself reaches kilometer scale.
The two-mass case: the simplified formula and the seesaw intuition
Two point masses on a line reduce to one relation.
xG = (m1 · x1 + m2 · x2) / (m1 + m2)
The picture is a seesaw. The fulcrum has to sit closer to the heavier mass, in inverse proportion to the two weights. Equal masses put G at mid-span. When one mass is twice the other, G sits one-third of the span from the heavy end and two-thirds from the light end. Shift the heavy mass farther out and G follows it. A beam balance has applied that inverse-mass rule for a few thousand years, and the same proportion remains the fastest check on a longer list.
Further masses add further terms of the same kind. No new relation appears.
Center of gravity of common homogeneous solids: triangle, half-disc, cone
Uniform density places G at the volume centroid, or at the area centroid of a thin plate. A short list of ready positions covers most hand calculations.
Triangle (homogeneous plate)
The three medians meet at G. Along each median that point sits two-thirds of the way from the vertex and one-third of the way up from the opposite side. With vertices A, B and C the medians are unnecessary: G is the arithmetic mean of the three corners. A triangular wire — three rods, no plate — is a different problem, weighted by side length rather than by area, and only an equilateral frame lands on the same point.
G = (A + B + C) / 3
Half-disc (homogeneous plate)
G lies on the axis of symmetry. Distance is measured from the diameter.
yG = 4R / (3π) ≈ 0.424 R
The result is not half a radius. More area sits near the cut than up at the crown, which pulls G toward the diameter.
Cone (homogeneous solid)
G lies on the axis. For a solid cone of height h, measured from the base, G is at h/4 — three-quarters of the way from the apex — the wide end being where the mass sits. A thin conical shell, the lateral surface only, with no lid and no filling, sits higher: h/3 from the base. A truncated cone needs both end radii. The expression is longer; each slice contributes mass times distance from the chosen origin.
zG = h / 4 (solid cone, from the base)
These positions are building blocks. A welded bracket is a rectangle plus a triangle minus a hole: each piece has a known G, and those three masses are the input to this page.
Why Σ(mi·xi) works: the statical moment in one sentence
The numerator is the first moment* of mass about the origin, known in statics as the statical moment.
xG = Σ(mi · xi) / Σ mi
G is the unique point at which that first moment vanishes. Moments of the weights taken about G cancel; that is Archimedes' lever, written for any number of masses. An additive first moment makes an awkward assembly legitimate input: the body is cut into lumps whose centers are already known, the products m·x and m·y are summed for each lump, and the totals are divided by the total mass. The table printed after a calculation is that sum, line by line, and it shows which mass is pulling G.
The pieces are added and divided by the total mass. That is the whole method.
Center of gravity and stability: the link to the base of support
A body standing on a floor stays put only while the vertical through G falls inside the base of support*, the polygon of the contact points.
- Inside the polygon — a small tilt raises G, and the weight produces a restoring moment. The body is stable.
- On an edge — limiting equilibrium. One further degree and the body overturns.
- Outside — the weight produces an overturning moment. The body tips.
A lower G and a wider base both add stability. The racing car uses a wide track and keeps G near the floor; the sailboat keel puts ballast under the waterline. Raising a forklift mast with a load on the tines shifts G forward and upward: the rear wheels unload, and the truck overturns once the vertical leaves the polygon. Scaffolding, a tall cabinet and a stack of pallets take the same test on a different polygon. Wheelbase and track of a vehicle are the base of support in the two plan directions.
A tall, narrow stack can carry a large mass and overturn under a shove, once G has left the polygon.
Moving to 3D: adding a third coordinate z
The third coordinate is the same sum, taken on z.
xG = Σ(mi·xi) / M · yG = Σ(mi·yi) / M · zG = Σ(mi·zi) / M
M = Σ mi
The three axes do not couple. One pass through the list accumulates M, Σmx, Σmy and Σmz, and three divisions follow. This page is two-dimensional: an omitted y is treated as zero, which is the one-dimensional case of a seesaw or a trailer. The height of G on a machine frame is a third pass over the same masses, with a column of z, done on paper or by running the list twice.
A continuous solid replaces the sums with integrals. In the shop the solid is divided into lumps whose centers are already known.
Center of gravity versus center of mass: the nuance that matters in a non-uniform gravity field
The center of mass belongs to the body: the amount of mass, and where that mass sits. The center of gravity is the point through which the resultant of the weights acts.
Where g is the same at every point, every element dm is pulled the same way and the two points coincide. Where g changes with height or direction, the elementary weights are no longer parallel, or no longer equal per kilogram, and the resultant no longer passes through the center of mass. A satellite in low orbit feels a slightly stronger pull on the Earth-facing side; the offset is millimeters, enough to produce a gravity-gradient torque, which some spacecraft use as a passive attitude spring. Over the height of a 400 m tower, g varies by only about one part in ten thousand, and far less across a ship. Civil work, vehicles and machine frames ignore the separation.
For any body a crane can lift, the two points are the same.
Worked examples: balancing a seesaw, loading a trailer evenly
Two layouts are small enough to check by hand before a longer list is trusted.
Balancing a seesaw
A 4.0 m plank, its own mass neglected, pivots at mid-span. A 25 kg child sits at the left end and a 70 kg adult sits on the right. How far from the pivot must the adult sit? With the origin at the pivot, the child is at x1 = −2.0 m, and balance requires xG = 0.
0 = (25 × (−2.0) + 70 × x2) / 95
70 · x2 = 50 ⇒ x2 = 50 / 70 ≈ 0.714 m
The adult sits about 0.71 m to the right of the pivot, well inboard of the end. A uniform plank of 20 kg with its own G at the pivot contributes a first moment of zero: the adult's position does not move, and only the total mass grows. An off-center pivot would have changed the answer; a centered pivot does not.
Loading a trailer
A two-wheel trailer has its axle 1.20 m from the hitch. The empty trailer is 150 kg with its own G at 0.80 m from the hitch, and a 400 kg crate has its center at 1.80 m.
xG = (150 × 0.80 + 400 × 1.80) / 550 = 840 / 550 ≈ 1.527 m
Combined G lies about 1.527 m from the hitch, 0.33 m behind the axle. The hitch carries an uplift rather than a download, and the trailer tries to lift the tow-ball. A 50 kg bag placed at 0.20 m from the hitch, next to the coupling, only draws G forward to 1.42 m, and that point remains behind the axle: nose ballast has a short moment arm compared with sliding the crate. For a 12 % tongue weight*, G needs to sit 0.12 × 1.20 = 0.144 m forward of the axle, at 1.056 m from the hitch. Solving (150 × 0.80 + 400 × xcrate) / 550 = 1.056 puts the crate at about 1.15 m from the hitch — over the axle, slightly toward the hitch, not hanging off the back door.
xcrate = (1.056 × 550 − 120) / 400 ≈ 1.15 m from the hitch
Moving the crate changes G more than adding that nose bag.
Measuring CoG on the shop floor
A CAD model is not required. Three methods cover almost every assembly that can be picked up.
- Suspension. The part is hung from one point and a plumb-line is dropped; it is hung from a second point and another line is dropped. G is the intersection of the two lines. The method suits a bracket, a fixture or a small weldment, and it becomes awkward once the part is too heavy to hang or once two convenient holes are missing.
- Two reactions. The part sits on two scales a known distance L apart, or on one scale and a dummy support. G along that axis is the first moment of the two readings. A forklift with a pallet on the tines is the same experiment: the rear axle is weighed, the front axle is weighed, and the two reactions locate G of truck plus load.
- Knife-edge. The part is balanced on a pipe or a straight-edge and the line is marked; the part is rotated 90° and the balance is repeated. Two lines fix one point. The method suits a plate, a wooden pattern or a casting that stays balanced.
xG = (RB · L) / (RA + RB) (origin at scale A, span L toward B)
Four pad scales under a vehicle give G in plan from the four wheel loads, together with a check that the readings sum to the known mass. The height of G takes a tilt-table or a raised-axle weighing, a separate measurement. The datum has to be written down — hitch pin, end of the plate, a scribed edge — or the center of gravity cannot be checked later. The weighing is repeated after the battery, the oil tank and the operator's seat go on; each of those is a mass, and each one moves G.
When two scale readings and a tape disagree with the CAD figure by more than a few percent, the scales are the measurement to keep. The usual cause is a density omitted from the model.
Trailer tongue weight: the 10–15 % rule
A working figure for a ball hitch is 10 to 15 % of the loaded trailer weight on the coupling. Boat trailers often sit near the top of that band, and a long, light box trailer near the bottom.
Too little tongue weight and the trailer yaws at speed, a sway the tow vehicle cannot damp. Too much loads the rear axle of the car past its share, unloads the front axle, and the steering goes light. The arithmetic is the same first moment: tongue load H = W × (Laxle − xG) / Laxle when G is forward of the axle, with W the loaded weight and Laxle the hitch-to-axle distance. A bathroom scale under a lever, or a dedicated tongue scale, is the measurement; how the bumper sits is not. On a tandem-axle trailer the mid-point of the bogie stands in for the axle in that expression, unless the manufacturer states otherwise.
H = W · (Laxle − xG) / Laxle (positive H = downward load on the ball)
If G sits behind the axle, H changes sign and the coupling carries an uplift. The trailer is unstable. The load is moved before the trailer is hitched; a weight-distribution hitch does not cancel that uplift.
Gross trailer mass, hitch class and the tow vehicle's rear-axle rating cap what that 10 to 15 % is allowed to be. This page locates G; the rating plate on the coupling decides whether that G is acceptable.
Holes, cut-outs and extra lumps
A hole is missing mass. It is subtracted at the centroid of the hole.
The parent body has mass M at (xP, yP), and the hole has mass mh, the material the drill removed, at (xh, yh). Combined G is the same weighted average with a minus sign on the hole. The form will not accept a non-positive mass — it rejects m ≤ 0 — and the subtraction is finished on paper, or the remainder is split into positive lumps the form will accept. A weld-on pad is the opposite case: extra mass at a known point, one further line in the list.
xG = (M · xP − mh · xh) / (M − mh)
A tank of liquid is a lump whose mass and whose G both move as the level drops. Empty, half and full are three separate checks when the machine has to stay stable in all three states.
What this page does not compute
G locates the mass. It does not describe how the cross-section bends, or how hard the part is to spin.
- The section modulus W = I/v is a property of the cross-section and is the geometric term in a bending-stress check. Mass does not enter.
- The mass moment of inertia is the spread of mass about a spin axis, in kg·m². G is located first, and the parallel-axis* shift is applied to the axis of interest.
- Beam bending takes a section modulus and a bending moment and returns stress and deflection.
A mass moment of inertia does not belong in a beam-stress check. The names look related. The units do not.
Glossary
- Centroid
- Average position of a line, an area or a volume. The weights in that average are length, area or volume; mass is not involved. On a homogeneous body the centroid and the center of mass coincide. A centroid read from a sketch is geometry, not a mass property.
- Center of mass
- Average position of the material in a body, weighted by mass. In translation the body behaves as if the entire mass were concentrated there. A change of density moves it; the outer outline alone does not. The location is a property of the body and does not depend on the gravity field.
- Center of gravity
- Point through which the resultant weight acts. In a uniform gravitational field it coincides with the center of mass. Where gravity varies with height or direction, the separate weights are no longer equivalent and the two points separate. On the Earth's surface, for ordinary structures and machines, the two points are treated as one.
- First moment
- Sum of each mass times its distance from a chosen origin or axis, written Σ(m·x), and known in statics as the statical moment. The center-of-mass coordinate is that sum divided by the total mass. About the center of mass the first moment is zero: the moments of the weights cancel.
- Base of support
- Polygon formed by the points where a body touches the ground. Upright equilibrium holds while the vertical through the center of gravity falls inside that polygon, is limiting when the vertical lies on an edge, and is lost when the vertical falls outside.
- Tongue weight
- Downward force of a trailer coupling on the tow ball. With the combined center of gravity forward of the axle, H = W · (Laxle − xG) / Laxle. A usual ball-hitch target is 10 to 15 % of the loaded trailer weight. A change of sign means the coupling is lifting rather than pressing.
- Parallel-axis theorem
- Relation between the mass moment of inertia about an axis and the moment about a parallel axis through the center of mass. The moment on the offset axis equals the moment about the center of mass plus the mass times the square of the distance between the axes. The center of mass is located before that shift is applied.