Center of Gravity Calculator

Calculate weighted centroids for structures, vehicles, and machinery. Model multiple masses with coordinates and offsets. Improve balance studies using precise results and clear visuals.

Enter Mass Points

Use the form below to calculate a 2D or 3D center of gravity.

2D mode keeps Z values at zero.
Examples: m, mm, ft, in.
Examples: kg, lb, ton.
Allowed range: 0 to 6.
Subtracted from each X coordinate.
Subtracted from each Y coordinate.
Subtracted from each Z coordinate.

Mass Point Table

Label Mass (kg) X (m) Y (m) Z (m) Remove
Each valid row needs mass and coordinates. Empty rows are ignored.

Example Data Table

This sample shows four mass points for a simple assembly.

Point Mass (kg) X (m) Y (m) Z (m)
Battery Pack200.00.00.0
Motor302.00.00.0
Frame Joint250.01.50.5
Control Unit151.02.01.0

Expected result: Total mass = 90 kg and center of gravity ≈ (0.833 m, 0.750 m, 0.306 m).

Formula Used

The calculator uses the weighted average of coordinates. First, each coordinate is shifted by the chosen reference offset:

x′i = xi − xref,   y′i = yi − yref,   z′i = zi − zref

Then the center of gravity is calculated with these equations:

XCG = Σ(mix′i) / Σmi
YCG = Σ(miy′i) / Σmi
ZCG = Σ(miz′i) / Σmi

In 2D mode, the calculator sets all Z values to zero. The moment terms M·X, M·Y, and M·Z help verify each weighted contribution.

How to Use This Calculator

  1. Select 2D or 3D mode.
  2. Enter your preferred length and mass units.
  3. Set reference offsets if your datum is not zero.
  4. Add one row for each component, point mass, or subsystem.
  5. Enter label, mass, and coordinates for every valid row.
  6. Choose your decimal precision.
  7. Press the calculate button.
  8. Review the result card, weighted table, and Plotly graph.
  9. Download the current dataset and results as CSV or PDF.

Frequently Asked Questions

1) What does this calculator measure?

It finds the weighted center location of several masses. Engineers use it to study balance, stability, lifting behavior, packaging layout, and support reactions.

2) Can I use the calculator for 2D layouts?

Yes. Choose 2D mode and the calculator treats every Z coordinate as zero. This is useful for plates, floor plans, panel layouts, and planar mechanisms.

3) What is the purpose of reference offsets?

Offsets let you report the center of gravity from a chosen datum instead of the original coordinate origin. This is helpful when drawings use shifted reference points.

4) Should all masses use the same unit?

Yes. Use one consistent mass unit across every row. Mixing kilograms and pounds without conversion will produce a wrong center of gravity.

5) Can negative coordinates be entered?

Yes. Negative coordinates are valid when components sit left, below, or behind the chosen datum. The calculator handles positive and negative positions correctly.

6) Why are weighted moments shown?

Weighted moments show each row’s mass contribution to the final center of gravity. They help with checking math, validating spreadsheets, and reviewing engineering assumptions.

7) Does this work for distributed loads?

Yes, if you first replace each distributed load with an equivalent point mass at its own centroid. Then enter that equivalent mass and coordinate.

8) When is the result unreliable?

Results become unreliable when units are mixed, masses are missing, coordinates are measured from different datums, or distributed bodies are modeled too roughly.

Related Calculators

top speed calculatorradiator size calculatorfuel injector size calculatorengine horsepower calculatorcamshaft lift calculatorturbocharger sizing calculatorengine compression ratio calculatorsuspension spring rate calculatorsuspension geometry calculatordifferential ratio calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.