Centroid calculator (composite shapes and polygons)
Enter your values. The answer and the full worked solution update as you type.
Result
| Part | A | x | y | A·x | A·y |
|---|---|---|---|---|---|
| rectangle 120 × 20 | 2400 | 60 | 10 | 144000 | 24000 |
| rectangle 20 × 100 | 2000 | 60 | 70 | 120000 | 140000 |
| triangle | 450 | 80 | 30 | 36000 | 13500 |
| hole: circle r = 6 | −113.1 | 60 | 100 | −6786 | −11310 |
Use the same length unit for every value; the area is in that unit squared.
Find the centroid of a composite area. Describe it as rectangles, triangles, circles and semicircles, with holes subtracted, or enter the corner points of a polygon. The calculator gives the total area, the centroid coordinates x̄ and ȳ and the second moments of area about the centroidal axes, with a table of every part.
Step-by-step solution
Area and centroid of each part
Centroid of the whole shape
Second moments about the centroid (parallel axis theorem)
Key formulas
- Centroid
- ȳ = ΣAiyi/ΣAi
- Rectangle
- I = bh³/12
- Parallel-axis theorem
- I = Ic + A·d²
- Composite section
- I = Σ(Ic,i + Aidi²)
How to find the centroid of a composite shape
- Split the shape into simple parts whose area and centroid you know, and treat holes as negative areas.
- Rectangle: centroid in the middle. Triangle: the average of the three corners. Semicircle: 4r/(3π) from the flat side.
- Multiply each area by the coordinates of its centroid and add up: ΣA·x and ΣA·y.
- Divide by the total area: x̄ = ΣA·x/ΣA and ȳ = ΣA·y/ΣA.
- For a polygon, use the shoelace formulas with the corner points in order.
Questions and answers
How do I enter the parts?
One part per entry, separated by semicolons: rect x y width height (with x, y the lower-left corner), tri x1 y1 x2 y2 x3 y3, circle xc yc r, semicircle xc yc r (flat side down, on the line y = yc). Put hole in front of a part to subtract it.
Can the centroid lie outside the shape?
Yes. For an L-shape, a ring or a C-shape the centroid is often in the empty space.
Do the polygon points have to go in a particular direction?
No, clockwise and anticlockwise both work. They must go round the outline in order, and the edges must not cross each other.
Why does a hole count as a negative area?
The shape with a hole is the full shape minus the hole, so both its area and its first moment of area are the full values minus those of the hole.
Practise it yourself
Practise Centroid & second moment of area
A calculator gives the answer. In the exam you need the method: practise it with new problems, hints and worked solutions.