Skip to content
MoneyDeck

Centroid Calculator

Centroid of a triangle, a polygon or a set of points from coordinates

Updated · Free, no signup

Centroid (x̄, ȳ)

(3, 3)

x̄

3

ȳ

3

Area

27

Triangle or polygon area (not used for a point set).

Points used

3

  • The centroid is where the three medians cross, two-thirds of the way from each vertex to the midpoint of the opposite side.

Vertices / points used

#xy
100
260
339

About the Centroid Calculator

The centroid is the geometric centre of a shape — the balance point of a flat cut-out of uniform thickness. This centroid calculator handles the three cases people actually need: a triangle given by three vertices, any simple polygon given by its corner coordinates in order, and a plain set of points whose centroid is just their average position.

For a triangle the centroid is where the three medians meet, and it is simply the mean of the vertex coordinates. For a general polygon that shortcut is wrong — the vertices are not the shape — so the calculator uses the area-weighted shoelace formula, which correctly finds the centre of L-shapes, irregular lots and other polygons. The point-set mode suits data, survey points or particle positions with equal weights.

Polygon vertices must be listed in order around the boundary (clockwise or counter-clockwise) and the edges must not cross. Enter points as “x, y” pairs, one per line; brackets and extra spaces are ignored.

How to use the centroid calculator

  1. 1Choose triangle, polygon or point set.
  2. 2For a triangle, enter the three vertex coordinates.
  3. 3For a polygon or point set, type one “x, y” pair per line (polygon vertices in boundary order).
  4. 4Read the centroid coordinates and, for shapes, the area.

Formula and method

Triangle / points: x̄ = Σx ÷ n, ȳ = Σy ÷ n · Polygon: A = ½Σ(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ), x̄ = Σ(xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ) ÷ 6A, ȳ = Σ(yᵢ + yᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ) ÷ 6A

For a set of equally weighted points the centroid is just the average position. A triangle happens to share that property: the centroid of its area equals the mean of its three vertices, ((x₁ + x₂ + x₃)/3, (y₁ + y₂ + y₃)/3), which is also where the medians intersect.

For a polygon with more sides, averaging vertices is wrong. The shoelace method splits the polygon into triangles fanned from the origin, each with signed area ½(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ) and centroid one-third of the way along, and takes the area-weighted average of those triangle centroids. Signed areas make the method work for concave shapes, and the last vertex wraps back to the first.

x̄, ȳ
Centroid coordinates
n
Number of points or vertices
A
Signed polygon area

Worked examples

Triangle (0, 0), (6, 0), (3, 9)

Average the vertices: x̄ = (0 + 6 + 3)/3 = 3 and ȳ = (0 + 0 + 9)/3 = 3. The triangle has base 6 and height 9, so its area is 27.

Triangle (2, 1), (8, 3), (5, 10)

x̄ = 15/3 = 5 and ȳ = 14/3 ≈ 4.667. The shoelace formula gives the area ½|2(3 − 10) + 8(10 − 1) + 5(1 − 3)| = ½ × 48 = 24.

L-shaped polygon

Split the L into a 4 × 1 strip (area 4, centre (2, 0.5)) and a 1 × 2 upright (area 2, centre (0.5, 2)). The weighted average is ((8 + 1)/6, (2 + 4)/6) = (1.5, 1). Averaging the six corners would wrongly give (1.67, 1.33).

Four data points

With equal weights the centroid is the mean: x̄ = 16/4 = 4 and ȳ = 12/4 = 3.

Frequently asked questions

How do you find the centroid of a triangle?+

Average the coordinates of the three vertices: ((x₁ + x₂ + x₃)/3, (y₁ + y₂ + y₃)/3). For (0, 0), (4, 0) and (2, 6) the centroid is (2, 2).

Is the centroid of a polygon the average of its vertices?+

Only for triangles (and highly symmetric shapes). For a general polygon you must weight by area using the shoelace-based formula, otherwise an L-shape or irregular lot gives the wrong centre.

Where is the centroid of a triangle located?+

At the intersection of the three medians, two-thirds of the way along each median from its vertex. It always lies inside the triangle.

Is the centroid the same as the center of mass?+

For a flat plate of uniform density, yes — the centroid is its centre of mass and balance point. If density varies, the centre of mass shifts toward the heavier region.

Can the centroid lie outside the shape?+

Yes, for concave shapes such as a C, a horseshoe or a thin L. Triangles and other convex shapes always have their centroid inside.

Related tools