Center of Mass Calculator (X,Y coordinates)
Five masses bolted to a frame, a set of weights on a plank, a drone with motors at four corners: in each case the system balances at one point, and that point is not the average of the positions. It is the average weighted by mass, so a heavy point drags the balance point toward itself.
This calculator finds that point in two dimensions. Enter the X and Y coordinates and the mass for up to five points, leave the rows you do not need blank, and it returns the center of mass as an (X, Y) pair, together with the total mass and the two moment sums behind the answer.
Point 1
Point 2
Point 3
Point 4
Point 5
Rows left completely or partly blank are ignored. Two dimensions only: this tool has no Z coordinate. Masses should be positive; the tool accepts negative numbers, but a negative mass has no physical meaning here.
Quick Answer
Key takeaways
- Center of mass is a weighted average of positions, weighted by mass. Equal masses reduce it to the plain average of the coordinates.
- Each coordinate is computed independently: X never mixes with Y. Keep the two columns straight and the arithmetic is simple.
- Blank or incomplete rows are ignored, so the same form serves a 2-point seesaw and a 5-point system.
- The result is only as meaningful as your origin. State where (0, 0) is, or the coordinates describe nothing.
- Quick Answer
- How to use the center of mass calculator
- The formula: a weighted average in each axis
- Worked example, checked against this exact tool
- Center of mass, centroid and center of gravity: which one do you need?
- What competing calculators miss
- Add This Calculator to Your Website
- Frequently Asked Questions
- References
How to use the center of mass calculator
Enter each point in its own row: its X coordinate, its Y coordinate and its mass. The calculator is pre-filled with the three-point worked example, so you can press Calculate immediately and then replace the numbers with your own. Rows 4 and 5 start blank; any row missing one of its three values is skipped entirely rather than treated as a zero, which matters, because a genuine zero coordinate is a real position on an axis and is counted.
Read the result as a pair of coordinates in the same frame you entered. The two sums under the result are the working: sum of m times X and sum of m times Y. If you are building a composite body out of pieces, those sums are what you carry forward and add across pieces.
For a shape rather than a set of point masses, the companion concept is the geometric center: the centroid calculator covers that case, where every part of the shape counts by area or volume instead of by an assigned mass. And if all you need is the plain, unweighted mean of a set of mass values, that is a different question answered by the average mass calculator.
The formula: a weighted average in each axis
Y coordinate: Y = (sum of mi yi) / (sum of mi)
Each point contributes its mass times its coordinate; the two axes are summed separately and divided by the same total mass.
This is the discrete form of the definition given in standard texts such as OpenStax University Physics: the center of mass position vector is the sum of each mass times its position vector, divided by the total mass. Splitting the vector into components gives the two formulas above. Nothing else enters: no distances between points, no angles, no order dependence. Swap two rows and the answer is identical.
Two limiting cases are worth internalizing because they let you sanity-check any result. If every mass is equal, the masses cancel and the center of mass is the ordinary average of the coordinates. And the center of mass always lies inside the convex hull of the points, pulled toward the heavy ones: if your answer lands outside the cluster of points, or closer to a light point than a heavy one, an input is wrong.
Worked example, checked against this exact tool
The calculator is pre-filled with this system, and the figures below are what it returns.
| Point | X | Y | Mass | m x X | m x Y |
|---|---|---|---|---|---|
| 1 | 2 | 3 | 5 | 10 | 15 |
| 2 | 4 | 6 | 3 | 12 | 18 |
| 3 | 1 | 1 | 2 | 2 | 2 |
| Totals | 10 | 24 | 35 |
X = 24 / 10 = 2.40 and Y = 35 / 10 = 3.50, so the center of mass is (2.40, 3.50), displayed to two decimal places. Note where it sits: nearest to point 1, the 5-unit mass at (2, 3), and pulled away from the light point at (1, 1). A plain coordinate average would have given (2.33, 3.33), close here only because the masses are similar; with a 50-unit mass in the mix the two answers diverge sharply.
Center of mass, centroid and center of gravity: which one do you need?
Center of mass (this tool)
- Weights each position by an actual mass
- Right for point masses, components, loads and assemblies
- Changes if you swap a part for a heavier one of the same size
Centroid
- The geometric center of a shape, from positions or areas alone
- Right for uniform-density plates, beams and cross-sections
- Identical to the center of mass when density is uniform
Center of gravity is the third term in the family: it is the point where the total weight can be treated as acting. In a uniform gravity field it coincides with the center of mass, which is why engineers use the terms loosely near the surface of the Earth. The distinction only starts to matter for very large structures, where gravity is not quite uniform across the object. For anything this calculator will ever be used for, center of mass and center of gravity are the same point.
What competing calculators miss
The tools ranking for this exact keyword are thin, and their gaps are practical rather than cosmetic.
Miss 1: no working shown. The same-name rival tool returns the (X, Y) pair and nothing else, so a student who mistyped one mass has no way to locate the error. This page shows the total mass and both moment sums, which are the two numbers you need to audit the division or carry the system into a bigger composite calculation.
Miss 2: fixed small systems, or claims the tool cannot keep. One rival walks through a three-point example and then describes adapting the method to three dimensions, while its form is as two-dimensional as this one. This tool is explicit about its limits instead: up to 5 points, X and Y only, blank rows ignored. Knowing a row was skipped, rather than silently read as zeros, is the difference between a right answer and a plausible wrong one.
One honest limit of this page: real objects are rarely five point masses. The standard workaround is decomposition: model each part of a composite body as one point at its own center of mass with the part total mass, then run those points through this calculator. Five parts cover most textbook and workshop problems, but a 40-component assembly needs the sums done in a spreadsheet.
Add This Calculator to Your Website
Frequently Asked Questions
The center of mass is the mass-weighted average position of a system: the single point where the total mass can be treated as concentrated for describing motion. It does not have to sit on any actual mass; the center of a hollow sphere or a doughnut is empty space, yet it is still the center of mass.
Just fill in the points you have and leave the rest blank. The calculator ignores any row that does not have an X, a Y and a mass, so two, three or four points work exactly the same way as five.
They are the first moments: the sum of each mass times its X coordinate, and the sum of each mass times its Y coordinate. Dividing each sum by the total mass gives the center of mass coordinates, so showing them lets you audit the answer or reuse them in a larger composite-body calculation.
No, as long as you are consistent. Use the same length unit for every X and Y, and the same mass unit for every mass. The answer comes back in the length unit you used, because the mass units cancel in the division.
Yes. Coordinates are measured from whatever origin your problem uses, and points on the negative side of an axis are routine, for example masses either side of a pivot. The weighted average handles the signs on its own.
The calculator shows an error, because dividing by a zero total mass is undefined. In practice it means no complete row was entered, or positive and negative masses cancelled out. Physically, masses in this tool should be positive.
The centroid is the geometric center of a shape, computed from positions alone. The center of mass weights positions by mass. They coincide when density is uniform, which is why the terms are often swapped, and why a separate centroid tool exists for pure geometry problems.
No. It works in two dimensions, X and Y, for up to 5 points. The 3D version adds the identical third formula, Z = sum of m times Z divided by total mass, but that is not a mode this tool offers.
References
- OpenStax, University Physics Volume 1, "Center of Mass": the position vector definition r = (1/M) sum of m times r, and its X, Y and Z components. OpenStax: Center of Mass. Accessed October 2026.
- LibreTexts, Introductory Physics, "The Center of Mass": derivation of the center of mass from Newton second law for a system of particles, and its relation to the center of gravity. LibreTexts: The Center of Mass. Accessed October 2026.
- APEX Calculus, "Center of Mass": the discrete-system theorem, center of mass as the sum of m times x over the sum of m, with worked point-mass examples. APEX Calculus: Center of Mass. Accessed October 2026.
