Statics & strength · Polygon contour

Centroid of an arbitrary cross-section

Define any polygon contour graphically or by coordinates and determine the area centroid x̄ and ȳ.

S(x̄,ȳ)2D

The calculation runs locally in your browser. Coordinates are neither transmitted nor stored.

01

Cross-section contour

Place or drag points along the outer boundary. The y-axis points upwards; the contour closes automatically.

P1P2P3P4
02

Coordinates

Pointx (mm)y (mm)Action
P1
P2
P3
P4

Need second moments of area? Go to the second-moment-of-area calculator for arbitrary cross-sections →

What does the centroid calculator compute?

The calculator determines the geometric area centroid of any polygonal cross-section contour. The geometry is defined either graphically in the editor or through vertex coordinates. The centroid describes the area's mean position within the chosen coordinate system -- for a beam cross-section, for example, the point through which the neutral axis passes under pure bending.

What is the area centroid?

In general, the area centroid is defined through the area integrals:

x̄ = (1/A) ∫A x dAȳ = (1/A) ∫A y dA

The centroid depends only on the geometry of the area. No material property enters the calculation -- elastic modulus, density or strength play no role for x̄ and ȳ.

Centroid of a polygon from coordinates

Instead of decomposing the area into rectangles or triangles, a straight-edged contour can be evaluated directly from the ordered sequence of its vertices. For each edge from Pi to Pi+1, ci = xi·yi+1 − xi+1·yi is formed.

A = ½ Σ cix̄ = (1/6A) Σ (xi+xi+1)ciȳ = (1/6A) Σ (yi+yi+1)ci

The points must be defined in consecutive order along the boundary. The final point is connected to the first automatically.

Centroid of symmetric cross-sections

Symmetry can immediately fix one centroid coordinate, but not necessarily both:

  • Rectangle → intersection of its two symmetry axes.
  • Circle → centre point.
  • A profile with one symmetry axis (e.g. a T-section) → the centroid lies on that axis; the second coordinate still has to be calculated.
  • An unsymmetric cross-section → no simple geometric shortcut, both coordinates must be calculated.

Can the centroid lie outside the area?

For convex polygons, the centroid always lies inside the polygon. For concave cross-sections -- such as an L- or U-shaped contour -- the centroid can, however, fall in a region with no material. This is geometrically correct, not a calculation error: the area's mean position need not coincide with a point of the area itself once the contour has reflex corners.

Area centroid vs. centre of mass

The area centroid is a purely geometric property of an area. The centre of mass additionally accounts for how mass is distributed within the component. For a prismatic body of homogeneous density, the area centroid's position in the cross-section and the projection of the centre of mass onto that cross-section coincide. With spatially varying density or multiple materials -- for example a composite steel-and-concrete section -- this no longer holds; the mass distribution then has to be weighted separately.

Relation to the second moment of area

The centroid also matters because second moments of area in beam bending are usually stated about the axes running through it. Ix, Iy and Ixy for this contour are calculated by the separate second-moment-of-area calculator for arbitrary cross-sections.

Worked example: 100 × 50 mm rectangle

Contour P1 = (0, 0), P2 = (100, 0), P3 = (100, 50), P4 = (0, 50):

A = 100 · 50 = 5.000 mm²x̄ = 50 mmȳ = 25 mm

From these, the first moments of area about the global axes shown follow:

Qx = A·ȳ = 5.000 · 25 = 125.000 mm³Qy = A·x̄ = 5.000 · 50 = 250.000 mm³

These values are also used as an automated reference test.

Scope and limitations

The calculator supports exactly one closed, non-self-intersecting outer contour made of straight edges. Holes, disconnected regions, arcs and DXF are currently excluded. The area centroid alone says nothing about strength, stiffness or mass distribution -- for that, use the second moments of area or a separate centre-of-mass calculation.

FAQ

Common questions

How do you calculate the centroid of an arbitrary cross-section?

Via the area integrals x̄ = (1/A)∫x dA and ȳ = (1/A)∫y dA. For a straight-edged contour these integrals can be evaluated directly from the vertex coordinates, without decomposing the area into rectangles or triangles.

How do you calculate the centroid from coordinates?

For each edge from Pi to Pi+1, form ci = xi·yi+1 − xi+1·yi. The sums give area A = ½Σci as well as x̄ = (1/6A)Σ(xi+xi+1)ci and ȳ = (1/6A)Σ(yi+yi+1)ci.

Must the vertices be entered clockwise?

No. Both traversal directions give the same centroid. The points must, however, be entered consecutively along the boundary; the final point is connected to the first automatically.

Can I calculate concave cross-sections?

Yes, as long as the contour is not self-intersecting. An L- or U-shape is a valid simple polygon contour and is evaluated correctly.

Can the centroid lie outside the cross-section?

Yes. For concave areas, S can geometrically fall in a region with no material -- for example in the opening of a U-shape. This is not a calculation error, it is a property of concave geometry.

What is the difference between the area centroid and the centre of mass?

The area centroid is a purely geometric property of the area and does not depend on material. The centre of mass additionally accounts for the mass distribution. For a prismatic body of homogeneous material, both positions coincide in the cross-section plane; with multiple materials or position-dependent density, they no longer do.

Where does the centroid lie for a symmetric cross-section?

On every axis of symmetry present. A rectangle has two symmetry axes, and their intersection is the centroid. A section with only one symmetry axis fixes only one of the two centroid coordinates; the other still has to be calculated.

Does the centroid change if I move the coordinate origin?

The numeric values x̄ and ȳ shift by exactly the translation amount. The position of S relative to the contour itself is unchanged -- the centroid is a property of the area, not of the chosen coordinate system.

What is the first moment of area?

Qx = ∫A y dA = A·ȳ is the first moment of area about the x-axis, Qy = ∫A x dA = A·x̄ about the y-axis. Both refer to the global axes shown, not the centroidal axes -- about the centroidal axes, Qx and Qy are zero by definition. The first moment of area has units of length cubed and must not be confused with the second moment of area (length to the fourth power).

Can I account for holes or cut-outs?

Not currently. This version supports one closed outer contour without internal holes.

References

Engineering and mathematical sources

Calculation basis: engineering mechanics and area integrals for polygonal sections; this is not a normative design rule.