Centroid Calculator screenshot Loading Centroid Calculator…

How to Use Centroid Calculator

New window

Centroid Calculator uses the method of composite areas. Build the shape from simple parts on the grid; holes count as negative areas.

Centroid calculator with a rectangle and a semicircle drawn on the grid
A rectangle with a semicircle on top: G is marked on the drawing

1 · Draw the parts on the grid

  1. Choose a tool above the grid: Rectangle, Triangle, Polygon, Circle, Semicircle or Quarter circle.
  2. Solid or hole? The Solid / Hole switch decides what the next part will be. Holes are subtracted.
  3. Draw with the mouse or a finger:
    • Rectangle – press at one corner and drag to the opposite corner.
    • Triangle – click the three corners.
    • Polygon – click the corners; click the first corner again, double-click or press Enter to close.
    • Circle, semicircle, quarter circle – press at the centre and drag out the radius.
  4. Grid and snap: type the grid spacing (e.g. 5, 10 or 0.5) and choose whether points snap to the grid, half or quarter grid, or not at all. The coordinates under the cursor are shown in the corner.
  5. Move and resize: with Select / move, drag a part to move it and drag its round handles to resize it. Drag the empty grid to pan; use the mouse wheel, pinch or the + / − buttons to zoom; Fit shows everything. ↶ (or Ctrl+Z) undoes, Delete removes the selected part.

2 · Edit the numbers

Every part appears in the Parts list with its numbers: a rectangle's left-bottom corner, width and height; a circle's centre and radius; a sector's centre, radius and angles α₁ → α₂ (counter-clockwise, degrees); the corners of a triangle or polygon (add or remove corners there). Change any number and the drawing follows. You can switch a part between solid and hole, duplicate or delete it.

Drawing a part on the grid and the editable parts list
Drawing area, tools and the editable parts list

3 · Read the result

The summary shows the total area and the centroid \((\bar x, \bar y)\); G and the centroidal axes are drawn in red. The Table of parts lists each part's area, centroid and first moments with the totals, and the Step-by-step solution shows the formulas with your numbers.

Table of parts
Areas, centroids and first moments of every part
Step-by-step solution for the centroid
The worked solution

Theoretical Background

New window

Centroid of an area

The centroid is the geometric centre of an area – the point where a thin uniform plate of that shape balances:

$$ \bar x = \frac{\int x\,dA}{\int dA}, \qquad \bar y = \frac{\int y\,dA}{\int dA} $$

\(Q_y = \int x\,dA\) and \(Q_x = \int y\,dA\) are the first moments of area.

Composite areas

For a shape made of parts with known areas \(A_i\) and centroids \((\bar x_i, \bar y_i)\):

$$ \bar X = \frac{\sum \bar x_i A_i}{\sum A_i}, \qquad \bar Y = \frac{\sum \bar y_i A_i}{\sum A_i} $$

Holes are included with a negative area.

Centroids of the basic shapes

ShapeAreaCentroid
Rectangle a × b, corner \((x_1,y_1)\)\(ab\)\((x_1 + a/2,\ y_1 + b/2)\)
Triangle\(\tfrac12|\dots|\)average of the three corners
Polygon (corners in order)\(\tfrac12\sum(x_iy_{i+1} - x_{i+1}y_i)\)\(\frac{1}{6A}\sum(x_i + x_{i+1})(x_iy_{i+1} - x_{i+1}y_i)\), same for y
Circle, radius r\(\pi r^2\)its centre
Semicircle\(\pi r^2/2\)\(4r/3\pi\) from the diameter
Sector of half-angle φ\(\varphi r^2\)\(\dfrac{2r\sin\varphi}{3\varphi}\) from the centre on the bisector

Worked example

Example

A 120 × 80 plate (corner at the origin) has a hole of radius 20 centred at (40, 40).

PartAx̄ȳx̄AȳA
Rectangle96006040576 000384 000
Hole−1256.644040−50 265.5−50 265.5
Σ8343.36525 734.5333 734.5

\(\bar X = 525\,734.5 / 8343.36 = 63.01\), \(\bar Y = 333\,734.5 / 8343.36 = 40.00\). The hole shifts G to the right, away from it; the shape is symmetric about y = 40, so \(\bar Y = 40\).

Symmetry

If an area has an axis of symmetry, the centroid lies on it. With two axes of symmetry the centroid is at their intersection – use this to check results.

FAQ

Is the centroid the same as the center of gravity?

For a plate of uniform thickness and material in a uniform gravity field, yes. For non-uniform bodies the center of gravity weights each part by its weight.

Does the order of the polygon corners matter?

No – the app uses the size of the area for either order. The corners must, however, go around the outline without the edges crossing each other.

Can the centroid lie outside the shape?

Yes – for example for an L-shape, a ring or a C-channel.

Can parts overlap?

Overlapping solid parts are counted twice. Split the shape so that parts touch but do not overlap, or enter the overlap as a gap.

Version history

  • 2.1.11 Dec 2026Rebuilt from scratch: draw rectangles, triangles, polygons, circles, semicircles and quarter circles directly on a grid with adjustable spacing and snap, edit every part as numbers, holes, undo, table of parts and full working.
  • 2.11 Dec 2026Rebuilt from scratch: draw rectangles, triangles, polygons, circles, semicircles and quarter circles directly on a grid with adjustable spacing and snap, edit every part as numbers, holes, undo, table of parts and full working.
  • 2.01 Dec 2026Modern layout: area tabs, solid parts and holes, table with each part, centroid calculation and drawing in the new design.