Centroid of a Triangle Calculator
Calculate the centroid of a triangle from vertex coordinates. Computes centroid point, medians, area, and visualizes the triangle with its centroid.
About
The centroid of a triangle is the point where its three medians intersect. A median connects a vertex to the midpoint of the opposing side. This intersection point, denoted G, always lies inside the triangle and divides each median in a 2:1 ratio measured from the vertex. In physics, the centroid corresponds to the center of mass of a uniform triangular lamina. If you place a physical triangle cutout on a pin at G, it balances perfectly. Errors in centroid computation propagate directly into structural load calculations, CNC machining offsets, and finite element mesh generation.
This calculator accepts three vertex coordinates (x1, y1), (x2, y2), (x3, y3) in the Cartesian plane. It returns the exact centroid coordinates, all three median lengths, side lengths, and the triangle area via the Shoelace formula. The tool rejects degenerate (collinear) inputs where area equals 0. Results assume a Euclidean plane with no curvature correction.
Formulas
The centroid G of a triangle with vertices (x1, y1), (x2, y2), (x3, y3) is computed as the arithmetic mean of the vertex coordinates:
The area of the triangle is obtained via the Shoelace (Surveyor's) formula:
Each median length from vertex A to the midpoint of side a (opposite) is:
Where x1, y1, x2, y2, x3, y3 are the Cartesian coordinates of the three vertices. A is the signed area (absolute value taken). a, b, c are the side lengths opposite to vertices A, B, C respectively. ma is the median from vertex A to the midpoint of side a. The centroid G divides each median in a 2:1 ratio from vertex to opposite midpoint.
Reference Data
| Triangle Type | Centroid Position | Median Property | Area Condition |
|---|---|---|---|
| Equilateral | Coincides with circumcenter, incenter, orthocenter | All 3 medians equal length | A = √34 a2 |
| Isosceles | Lies on axis of symmetry | 2 medians equal | A = b4√4a2 − b2 |
| Scalene | No special alignment with other centers | All 3 medians differ | Use Shoelace or Heron's formula |
| Right Triangle | 13 from hypotenuse midpoint to right-angle vertex | Median to hypotenuse = half hypotenuse | A = 12ab |
| Obtuse | Closer to the obtuse vertex | Longest median from smallest angle vertex | Standard formulas apply |
| Acute | Roughly centered | All medians inside triangle | Standard formulas apply |
| Degenerate (collinear) | Undefined (no triangle) | No medians exist | A = 0 |
| Very Narrow (near-degenerate) | Near the longest side | One median very short | A ≈ 0 |
| Center Type | Definition | Always Inside? | Coordinate Formula |
|---|---|---|---|
| Centroid (G) | Median intersection | Yes | (x1+x2+x33, y1+y2+y33) |
| Circumcenter (O) | Perpendicular bisector intersection | No (outside for obtuse) | Requires solving linear system |
| Incenter (I) | Angle bisector intersection | Yes | Weighted by side lengths |
| Orthocenter (H) | Altitude intersection | No (outside for obtuse) | Requires altitude equations |
| Nine-Point Center (N) | Midpoint of O and H | Yes (for acute) | Average of O and H |
| Property | Value / Rule |
|---|---|
| Centroid divides each median | 2:1 ratio (vertex to midpoint) |
| Euler Line | G lies on segment OH, with OG:GH = 1:2 |
| Median length formula | ma = 12√2b2 + 2c2 − a2 |
| Sum of squared medians | 34(a2 + b2 + c2) |
| Centroid minimizes | Sum of squared distances to vertices |
| Barycentric coordinates of G | (1:1:1) |