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 (where the medians meet), the orthocenter (where the altitudes meet), the circumcenter (center of the circle through the three vertices) and the incenter (center of the circle touching the three sides). It also gives the area and the radii and , 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 , so you can copy an exact answer into your work.
How to use this calculator
- Choose Triangle, Set of points or Polygon.
- Triangle: enter the coordinates of , and .
- Points: add one row per point. Polygon: list the vertices in order around the boundary (either direction) without repeating the first one.
- Read the centroid at the top. For triangles the orthocenter, circumcenter, incenter, area and radii follow; for polygons the area and the vertex order.
- 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:
Points. For points with equal weights, and .
Polygon (vertices , indices taken modulo ), from the shoelace formula:
Other triangle centers. The circumcenter is the point equidistant from the three vertices (intersection of the perpendicular bisectors). The orthocenter follows from Euler's relation . With side lengths , , , the incenter is , and the radii are and , where is the area and the semi-perimeter.
Worked example
The 13-14-15 triangle. Take , , : the sides are 15, 13 and 14 and the area is 84.
- Centroid:
- Circumcenter: , with
- Orthocenter:
- Incenter: , with
sits one third of the way from to , on the Euler line.
An L-shaped polygon with vertices has area 6 and centroid . The plain average of its six vertices is — 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 | the three medians | yes, 2/3 of the way along each median from its vertex |
| Orthocenter | the three altitudes | no: at the right-angle vertex of a right triangle, outside an obtuse one |
| Circumcenter | the perpendicular bisectors | no: at the midpoint of the hypotenuse of a right triangle, outside an obtuse one |
| Incenter | the angle bisectors | yes, always |
, and always lie on one line, the Euler line, with ; the incenter is generally not on it. To use this page as an orthocenter calculator, simply read in the results — the steps show how it follows from .
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
- Weisstein, Triangle Centroid — Wolfram MathWorld
- Weisstein, Orthocenter — Wolfram MathWorld
- Weisstein, Circumcenter — Wolfram MathWorld
- Weisstein, Incenter — Wolfram MathWorld
- Weisstein, Polygon Centroid — Wolfram MathWorld
- P. Bourke, Calculating the area and centroid of a polygon (1988)
Last updated: