Centroid Calculator
Calculate the centroid coordinates x̄ and ȳ for composite areas, holes, cutouts, and ordered polygon vertices.
Calculator is for informational purposes only. Terms and Conditions
Choose the centroid method
Use composite area mode for engineering sections or polygon mode for ordered coordinate vertices.
Enter the known values
Keep every coordinate measured from the same reference origin.
Visual Check
The diagram plots the reference axes, entered geometry, and calculated centroid marker.
Solution
Live centroid result, quick checks, warnings, and calculation steps.
Quick checks
- Check—
Show solution steps See the equation, substitutions, assumptions, and result path
- Enter values to see the full solution steps and checks.
Source, Standards, and Assumptions
Calculation basis, constants, assumptions, and limitations.
Source/standard information updates based on the selected centroid method.
- Assumptions will appear after a valid calculation.
Calculator guide
How the Centroid Calculator Works
The Centroid Calculator above finds the geometric center coordinates \( \bar{x} \) and \( \bar{y} \) for composite areas, holes, cutouts, and irregular polygons defined by ordered vertices.
The calculator supports two practical workflows. Composite area mode uses the area and centroid location of each simple part. Polygon mode uses ordered \(x,y\) coordinates around a closed boundary. In both cases, the final result is measured from the coordinate origin used for the inputs.
- Best for
- Composite sections, plates with holes, cutouts, built-up shapes, and irregular polygons
- Main result
- Centroid coordinates \( \bar{x} \) and \( \bar{y} \)
- Most important rule
- Measure every part centroid and polygon coordinate from one consistent origin
How to Calculate a Centroid
Choose the method that matches the geometry you already have, then verify the coordinate system before entering values.
-
Choose composite area or polygon mode
Use composite mode when the shape can be divided into rectangles, triangles, circles, or other parts with known areas and centroid locations. Use polygon mode when the boundary is defined by ordered coordinate vertices.
-
Establish one reference origin
Every \(x_i\), \(y_i\), and polygon vertex must use the same coordinate system. A convenient lower-left corner or centerline often simplifies the arithmetic.
-
Enter solids and holes correctly
In composite mode, enter the physical area magnitude and use the part type to identify holes or cutouts so their contribution is subtracted.
-
Enter polygon vertices in perimeter order
Use clockwise or counterclockwise boundary order. Do not sort points by x-coordinate or y-coordinate.
-
Use symmetry and the live visual as a check
The live calculator plots the entered geometry and centroid marker. For a symmetric shape, the centroid should lie on every applicable axis of symmetry.
Centroid Inputs and Outputs
The live calculator provides composite-area and polygon methods, example loaders, selectable length units, answer units, precision controls, a visual geometry check, warnings, and step-by-step calculations.
| Quantity | Meaning | Units or Format |
|---|---|---|
| Part area \(A_i\) | Area of each solid piece or cutout in composite mode | Matching square length unit |
| Part centroid \(x_i,y_i\) | Centroid coordinates of each simple part from the shared origin | Length |
| Part type | Identifies a contribution as solid material or a hole/cutout | Solid or hole |
| Polygon vertices | Ordered coordinate pairs describing a simple polygon boundary | One \(x,y\) pair per line |
| Centroid \( \bar{x},\bar{y} \) | Geometric center of the complete entered area | Length |
| Total signed area | Net area after solid and removed regions are combined | Square length unit |
Centroid Formulas
Composite-area centroid is an area-weighted average. Polygon centroid uses the signed area generated by adjacent ordered vertices.
Composite area centroid
Multiply each signed area by its centroid coordinate, sum the first moments, then divide by total signed area.
Polygon signed area
The final vertex connects back to the first vertex, so \(x_{n+1}=x_1\) and \(y_{n+1}=y_1\).
Polygon centroid coordinates
These equations apply to a simple non-self-intersecting polygon whose vertices are entered in boundary order.
Triangle centroid from three vertices
For a right triangle with the right-angle corner at the origin and legs along the axes, the centroid is at \(b/3,\ h/3\).
Worked Example: Rectangle With a Hole
A 10 in × 6 in rectangular plate has a circular hole of radius 2 in centered at \(x=7\) in, \(y=3\) in. Find the centroid of the remaining area from the rectangle’s lower-left corner.
Total signed area
First moment for \( \bar{x} \)
First moment for \( \bar{y} \)
Centroid coordinates
Result
\( (\bar{x},\bar{y})\approx(4.47,\ 3.00)\ \mathrm{in} \)
The hole is to the right of the rectangle center, so removing that area shifts the centroid left from \(x=5\) in. The geometry remains symmetric about \(y=3\) in, so \( \bar{y}=3\) in.
Polygon Centroid From Coordinates
Polygon mode is useful when a 2D boundary is already known from surveying, CAD, coordinate geometry, or an irregular outline. The key requirement is correct vertex order.
Use clockwise or counterclockwise order
Either direction works when used consistently. Reversing direction changes the sign of the intermediate signed area but not the physical centroid after the formula is applied consistently.
Do not sort by x or y
The equations pair each point with the next point along the boundary. Random sorting can create crossing edges and a meaningless signed-area result.
Avoid duplicate consecutive vertices
Repeated points add unnecessary zero-length edges and can hide data-entry errors.
Self-intersecting polygons need different treatment
The standard formula cited here is for a simple non-self-intersecting polygon. A bow-tie or crossing boundary should be corrected or decomposed first.
Centroids of Common Shapes
Known simple-shape centroids are useful both for building composite sections and for checking whether a result is plausible.
| Shape | Area | Centroid Location |
|---|---|---|
| Rectangle | \(A=bh\) | \(b/2,\ h/2\) from a corner |
| Right triangle | \(A=bh/2\) | \(b/3,\ h/3\) from the right-angle corner |
| Circle | \(A=\pi r^2\) | At the circle center |
| Semicircle | \(A=\pi r^2/2\) | \(4r/(3\pi)\) from the diameter along the symmetry axis |
| Quarter circle | \(A=\pi r^2/4\) | \(4r/(3\pi)\) from each straight edge |
When a composite section has a line of symmetry, use that fact before doing arithmetic. The centroid must lie on that symmetry line, which can eliminate one coordinate calculation or immediately reveal an input error.
Holes, Cutouts, and Signed Areas
A hole is handled by subtracting its area and its first moment contributions from the solid shape. This is the same composite-parts method used in engineering statics.
Signed-area representation
In the centroid numerator, each removed area also subtracts its \(A_i x_i\) and \(A_i y_i\) contribution.
Centered hole
A hole centered on an existing symmetry axis does not move the centroid off that axis, although it can move the centroid along the other coordinate direction.
Off-center hole
Removing area on one side shifts the centroid away from the hole because material has been removed from that side of the weighted average.
How to Interpret the Result
The centroid coordinates identify a geometric location relative to the selected origin. The same physical centroid will have different coordinate values if the origin changes.
Symmetry is the fastest check
If the shape is symmetric about an axis, the centroid must lie on that axis.
Large distant areas have more leverage
An area farther from the reference axis produces a larger first moment \(A_i x_i\) or \(A_i y_i\), so it pulls the weighted centroid more strongly.
The centroid can lie outside the material
For concave shapes, open geometries, or shapes with large cutouts, the geometric centroid does not have to fall within the remaining material.
Units, Origins, and Input Checks
Centroid formulas are simple enough that setup errors usually dominate numerical error. Check the coordinate system and dimensions before checking the arithmetic.
Use one origin
Do not mix local part coordinates with global section coordinates. Convert every part centroid to the same global reference before entering it.
Match area and coordinate units
If coordinates are in inches, direct composite area entries should be in square inches unless the calculator explicitly converts them as part of the selected unit system.
Remember the dimensional result
\((\mathrm{length}^2)(\mathrm{length})/\mathrm{length}^2=\mathrm{length}\), so centroid coordinates always have length units.
Check negative coordinates deliberately
Negative \(x_i\) or \(y_i\) values are valid when parts lie on the negative side of the chosen axis. Do not change a coordinate sign merely because the part area is a hole.
Verify total signed area
Net area should match the physical remaining area. A negative or unexpected total often means a solid/hole classification error.
Use the calculator examples as QA cases
The live tool provides rectangle-with-hole, T-section, L-section, triangle, and irregular-polygon example loaders that can help confirm the selected workflow.
Centroid vs Center of Mass
A centroid is weighted by geometry. Center of mass is weighted by mass. They coincide only when the material distribution makes the geometric and mass weighting equivalent.
Centroid
The geometric center of an area, line, or volume. For the 2D calculator on this page, the weighting quantity is area.
Center of mass
The mass-weighted average position. Nonuniform density, thickness, or attached masses can move it away from the area centroid.
For a flat plate of uniform thickness and density, the area centroid and center of mass coincide. In a uniform gravitational field, the center of gravity also coincides with center of mass.
Common Centroid Mistakes
Most incorrect results can be traced to one of six setup errors.
Mixing local and global coordinates
Part centroid coordinates must all be measured from the same reference axes used for the final result.
Forgetting to subtract a hole
A cutout removes both area and first moment. It cannot be treated as a positive solid area.
Changing coordinate signs for a hole
The area sign and coordinate sign represent different concepts. A hole at positive \(x\) still has a positive \(x_i\); its negative contribution comes from the signed area.
Entering polygon points out of order
Random point order can create crossing edges and an incorrect signed-area calculation.
Assuming the centroid must lie inside the material
That expectation fails for some concave or cutout geometries.
Using centroid as a complete structural answer
Centroid location alone does not calculate stiffness, strength, stress, deflection, or buckling capacity.
Assumptions and Engineering Limits
The calculator determines 2D geometric centroid location from idealized inputs. It does not automatically account for manufacturing detail or broader structural behavior.
Idealized geometry
Fillets, chamfers, corner radii, weld metal, holes, slots, and manufacturing tolerances only affect the result if they are represented in the entered geometry.
Area weighting, not density weighting
Composite centroid mode assumes a geometric area problem. Nonuniform density or thickness requires a center-of-mass formulation instead.
Simple polygon assumption
Polygon mode is intended for a closed, non-self-intersecting boundary entered in perimeter order.
No 3D centroid calculation
This page calculates planar area centroids. Volumetric centroids require volume weighting and three coordinates.
No section-property completion
The calculator does not by itself return area moment of inertia, product of inertia, principal axes, section modulus, or radius of gyration.
No design-code verification
Structural or mechanical design still requires the applicable material, loading, serviceability, stability, and safety checks.
Sources and Calculation Basis
The composite-area method, negative-area convention, symmetry checks, and polygon equations were checked against established engineering-statics and geometry references.
- Engineering Statics — Centroids Using Composite Parts — supports the area-weighted centroid equations, one-common-origin workflow, first moments of area, and treatment of holes as negative areas.
- Engineering Statics — Centroids of Common Shapes — provides reference areas and centroid locations for rectangles, triangles, circles, semicircles, quarter circles, and other common shapes.
- Wolfram MathWorld — Polygon Centroid — supports the signed-area centroid formulas for planar non-self-intersecting polygons with ordered vertices.
The rectangle-with-hole example was independently recalculated from exact \( \pi r^2 \) area. The centroid is \( \bar{x}\approx4.472\ \mathrm{in} \), \( \bar{y}=3.000\ \mathrm{in} \), consistent with symmetry and the expected shift away from the right-side cutout.
Centroid Calculator FAQ
These questions address the most common centroid setup and interpretation problems.
What does a centroid calculator find?
It finds the geometric center coordinates of an area or planar shape. This calculator reports \( \bar{x} \) and \( \bar{y} \) for composite areas and ordered polygons.
What is the centroid formula for a composite area?
Use \( \bar{x}=\sum A_i x_i/\sum A_i \) and \( \bar{y}=\sum A_i y_i/\sum A_i \), with holes represented by negative signed area.
Are holes negative in centroid calculations?
Yes. A hole or cutout removes area, so its area and first-moment contribution are subtracted in the composite-area method.
Can a centroid be outside the shape?
Yes. Some concave shapes, open shapes, and shapes with large cutouts have geometric centroids that lie outside the remaining material.
Why does the coordinate origin matter?
The physical centroid does not change, but its numerical coordinates depend on the selected origin. Every part coordinate must therefore use the same reference axes.
How do I calculate the centroid of a polygon from vertices?
Enter the vertices in clockwise or counterclockwise perimeter order. The calculator uses the polygon signed-area formula and the corresponding weighted vertex sums to calculate \( \bar{x} \) and \( \bar{y} \).
Is centroid the same as center of mass?
Only when the material distribution makes geometric area weighting equivalent to mass weighting—for example, a flat plate with uniform density and thickness. Otherwise, center of mass can differ from the centroid.
What should I calculate after finding the centroid of a beam section?
A common next step is area moment of inertia about the centroidal axes, followed by section modulus, bending stress, or beam-deflection calculations as required by the engineering problem.