Skip to content

Centroid Calculator: Triangle, Points and Polygons

Centroid of a triangle, a set of points or a polygon, plus the orthocenter, circumcenter and incenter of a triangle.

Your details

Shape

Results update as you type

Centroid (x̄, ȳ)

(6.333333, 4)

Centroid as fractions
(19/3, 4)
Area
84 square units
Orthocenter H
(5, 3.75)
Circumcenter O
(7, 4.125)
Incenter I
(6, 4)
Circumradius R
8.125
Inradius r
4

Step-by-step solution
  1. Centroid G = average of the vertices: ((0 + 14 + 5)/3, (0 + 0 + 12)/3) = (6.333333, 4)
  2. Sides: a = BC = 15, b = CA = 13, c = AB = 14
  3. Area = |(B − A) × (C − A)| / 2 = 84
  4. Circumcenter O (equidistant from A, B, C) = (7, 4.125), circumradius R = 8.125
  5. Orthocenter H = A + B + C − 2O = (5, 3.75)
  6. Incenter I = (a·A + b·B + c·C) / (a + b + c) = (6, 4), inradius r = Area / s = 4
  7. Check: G, O and H lie on the Euler line with HG = 2·GO.

The centroid is the balance point of a shape: cut the shape out of uniform cardboard and it balances on a pin placed there. This centroid calculator finds it in three situations — a triangle given by its three vertices, a set of points with equal weights, and a polygon of any number of sides given by its vertices in order.

For a triangle it goes further. Triangles have several classical centers, and the calculator returns the four that school and contest problems ask for most: the centroid GG (where the medians meet), the orthocenter HH (where the altitudes meet), the circumcenter OO (center of the circle through the three vertices) and the incenter II (center of the circle touching the three sides). It also gives the area and the radii RR and rr, and the steps show every formula with your numbers.

When all coordinates are whole numbers, the centroid is also given exactly as fractions, such as (19/3, 4)(19/3,\ 4), so you can copy an exact answer into your work.

How to use this calculator

  1. Choose Triangle, Set of points or Polygon.
  2. Triangle: enter the coordinates of A(x1,y1)A(x_1, y_1), B(x2,y2)B(x_2, y_2) and C(x3,y3)C(x_3, y_3).
  3. Points: add one row per point. Polygon: list the vertices in order around the boundary (either direction) without repeating the first one.
  4. Read the centroid (xˉ,yˉ)(\bar{x}, \bar{y}) at the top. For triangles the orthocenter, circumcenter, incenter, area and radii follow; for polygons the area and the vertex order.
  5. Open the steps to see the averages, the shoelace sums and the Euler line check.

The formula

Triangle. The centroid is the average of the vertices:

G=(x1+x2+x33, y1+y2+y33)G = \left(\frac{x_1 + x_2 + x_3}{3},\ \frac{y_1 + y_2 + y_3}{3}\right)

Points. For nn points with equal weights, xˉ=1n∑xi\bar{x} = \frac{1}{n}\sum x_i and yˉ=1n∑yi\bar{y} = \frac{1}{n}\sum y_i.

Polygon (vertices (x0,y0),…,(xn−1,yn−1)(x_0, y_0), \dots, (x_{n-1}, y_{n-1}), indices taken modulo nn), from the shoelace formula:

A=12∑i=0n−1(xiyi+1−xi+1yi)A = \frac{1}{2}\sum_{i=0}^{n-1} (x_i y_{i+1} - x_{i+1} y_i)
Cx=16A∑(xi+xi+1)(xiyi+1−xi+1yi),Cy=16A∑(yi+yi+1)(xiyi+1−xi+1yi)C_x = \frac{1}{6A}\sum (x_i + x_{i+1})(x_i y_{i+1} - x_{i+1} y_i), \quad C_y = \frac{1}{6A}\sum (y_i + y_{i+1})(x_i y_{i+1} - x_{i+1} y_i)

Other triangle centers. The circumcenter OO is the point equidistant from the three vertices (intersection of the perpendicular bisectors). The orthocenter follows from Euler's relation H=A+B+C−2OH = A + B + C - 2O. With side lengths a=BCa = BC, b=CAb = CA, c=ABc = AB, the incenter is I=aA+bB+cCa+b+cI = \frac{aA + bB + cC}{a + b + c}, and the radii are R=abc4KR = \frac{abc}{4K} and r=Ksr = \frac{K}{s}, where KK is the area and ss the semi-perimeter.

Worked example

The 13-14-15 triangle. Take A(0,0)A(0, 0), B(14,0)B(14, 0), C(5,12)C(5, 12): the sides are 15, 13 and 14 and the area is 84.

  • Centroid: G=(0+14+53,0+0+123)=(19/3,4)≈(6.333333,4)G = \left(\frac{0 + 14 + 5}{3}, \frac{0 + 0 + 12}{3}\right) = (19/3, 4) \approx (6.333333, 4)
  • Circumcenter: O=(7,4.125)O = (7, 4.125), with R=8.125R = 8.125
  • Orthocenter: H=A+B+C−2O=(5,3.75)H = A + B + C - 2O = (5, 3.75)
  • Incenter: I=(6,4)I = (6, 4), with r=4r = 4

GG sits one third of the way from OO to HH, on the Euler line.

An L-shaped polygon with vertices (0,0),(4,0),(4,1),(1,1),(1,3),(0,3)(0,0), (4,0), (4,1), (1,1), (1,3), (0,3) has area 6 and centroid (1.5,1)(1.5, 1). The plain average of its six vertices is (1.666667,1.333333)(1.666667, 1.333333) — a different point, which is why polygons need the area formula.

Triangle centroid, orthocenter, circumcenter and incenter

These four centers coincide only in an equilateral triangle. Elsewhere they behave differently:

Center Intersection of Always inside?
Centroid GG the three medians yes, 2/3 of the way along each median from its vertex
Orthocenter HH the three altitudes no: at the right-angle vertex of a right triangle, outside an obtuse one
Circumcenter OO the perpendicular bisectors no: at the midpoint of the hypotenuse of a right triangle, outside an obtuse one
Incenter II the angle bisectors yes, always

GG, OO and HH always lie on one line, the Euler line, with HG=2 GOHG = 2\,GO; the incenter is generally not on it. To use this page as an orthocenter calculator, simply read HH in the results — the steps show how it follows from OO.

Centroid of points versus centroid of a shape

The centroid of a set of points treats each point as an equal mass. The centroid of a triangle happens to equal the average of its three vertices, but this coincidence does not extend to polygons with four or more sides: the area centroid weights each part of the region by its area. That is why the polygon mode uses the shoelace-based formula, and the steps show the plain vertex average for comparison. For beam and profile sections in engineering, the cross-sectional area calculator also gives the centroid together with the second moment of area.

Frequently asked questions

How do I find the centroid of a triangle?

Add the three x-coordinates and divide by 3, then do the same for the y-coordinates. For A(0, 0), B(14, 0) and C(5, 12) the centroid is (19/3, 4). It is also where the three medians meet.

How is the orthocenter calculated?

The calculator first finds the circumcenter O, the point equidistant from the three vertices, and then uses Euler’s relation H = A + B + C − 2O. This gives the same point as intersecting two altitudes, with less arithmetic.

Why is the orthocenter outside my triangle?

In an obtuse triangle two altitudes fall outside the triangle, so they meet outside it. In a right triangle the orthocenter is exactly the vertex of the right angle.

What if my polygon’s edges cross?

The shoelace formula assumes a simple polygon whose vertices are listed in order around the boundary. If two edges cross, the loops are counted with opposite signs; the calculator warns you so you can reorder the vertices.

Does the vertex order matter for a polygon?

Only the direction’s sign: counter-clockwise order gives a positive shoelace sum, clockwise a negative one. The centroid is the same, and the area is reported as a positive value either way.

Is the centroid the same as the center of mass?

Yes, for a shape of uniform density or for equal point masses. If the density varies, or the points have different masses, you need a weighted average instead.

Sources

Last updated:

More Math calculators

People also use