Centroid of a Triangle Calculator

Enter the (x, y) coordinates of the three vertices. The calculator returns the centroid — the intersection point of the three medians — along with each side midpoint, the three median lengths, and the triangle area.

#geometry#triangle#centroid#coordinates#medians

Centroid (Gx, Gy)

(3, 2)

Gx = (x₁ + x₂ + x₃) / 3
3
Gy = (y₁ + y₂ + y₃) / 3
2
Midpoint of BC (opposite A)
(4.5, 3)
Midpoint of AC (opposite B)
(1.5, 3)
Midpoint of AB (opposite C)
(3, 0)
Median from A
5.4083
Median from B
5.4083
Median from C
6
Triangle area (shoelace)
18

The centroid of a triangle is the arithmetic mean of its vertex coordinates: G = ((x₁+x₂+x₃)/3, (y₁+y₂+y₃)/3). It is the intersection of the three medians and divides each median in a 2:1 ratio from vertex to midpoint.

How to use this calculator

Type the (x, y) coordinates of the three vertices A, B, and C of your triangle. Coordinates can be any real numbers — positive, negative, or zero — and there is no requirement to use any particular unit. The headline result is the centroid (Gx, Gy). The breakdown also shows you the midpoints of each side, the length of each median, and the triangle area computed from the shoelace formula. If the three vertices are collinear, no triangle exists and the calculator flags the input as degenerate instead of returning a centroid.

How the calculation works

The centroid of a triangle is the arithmetic mean of its three vertex coordinates: Gx = (x₁ + x₂ + x₃) / 3 and Gy = (y₁ + y₂ + y₃) / 3. Geometrically, it is the point where the three medians — the line segments joining each vertex to the midpoint of the opposite side — meet. The centroid divides each median in a 2:1 ratio measured from the vertex (the longer segment is between the vertex and the centroid). It is also the triangle's centre of mass when the triangle is modelled as a uniform-density lamina, which is why physics and engineering problems often call it the centre of gravity. The calculator also reports the side midpoints (the endpoints of each median), the median lengths via the Euclidean distance from vertex to midpoint, and the triangle area from the shoelace formula |x₁(y₂ − y₃) + x₂(y₃ − y₁) + x₃(y₁ − y₂)| / 2.

Worked example

Take A = (0, 0), B = (6, 0), C = (3, 6). Then Gx = (0 + 6 + 3) / 3 = 3 and Gy = (0 + 0 + 6) / 3 = 2, so the centroid is (3, 2). The midpoint of BC, opposite A, is ((6 + 3)/2, (0 + 6)/2) = (4.5, 3); the median from A has length √(4.5² + 3²) = √29.25 ≈ 5.408. The triangle area via the shoelace formula is |0·(0 − 6) + 6·(6 − 0) + 3·(0 − 0)| / 2 = 36 / 2 = 18 square units.

Frequently asked questions

What is the centroid of a triangle?

The centroid of a triangle is the single point where its three medians meet. A median is a line segment from a vertex to the midpoint of the opposite side, and every triangle has exactly three of them — one per vertex. The centroid is also the triangle's centre of mass when treated as a uniform sheet, so it is sometimes called the centre of gravity. Among the four classical triangle centres (centroid, incentre, circumcentre, orthocentre), the centroid is the easiest to compute from coordinates: it is just the average of the three vertices.

What is the formula for the centroid?

For a triangle with vertices (x₁, y₁), (x₂, y₂), and (x₃, y₃), the centroid is G = ((x₁ + x₂ + x₃) / 3, (y₁ + y₂ + y₃) / 3). In words, you take the arithmetic mean of the three x-coordinates to get Gx, and the arithmetic mean of the three y-coordinates to get Gy. The formula extends straightforwardly to triangles in three-dimensional space — average each of the three coordinates separately — and to higher-dimensional simplices.

Why does the centroid divide each median in a 2:1 ratio?

Pick any vertex V and let M be the midpoint of the opposite side. The median is the segment VM. The centroid G lies on VM and the ratio VG : GM is always 2 : 1. The cleanest proof is via vectors: write each vertex as a position vector, take the centroid as the mean (V₁ + V₂ + V₃) / 3, and verify by substitution that G − V = (2/3)(M − V), which is exactly the 2:1 split. Practically, this means the centroid is twice as far from each vertex as it is from the corresponding side midpoint.

Is the centroid the same as the incentre or circumcentre?

No — they are three different triangle centres and only coincide for equilateral triangles. The centroid is the average of the vertices. The incentre is the centre of the inscribed circle and is equidistant from the three sides. The circumcentre is the centre of the circumscribed circle and is equidistant from the three vertices. For non-equilateral triangles these three points all sit at different locations; in fact for any triangle the centroid, circumcentre, and orthocentre are collinear and lie on the Euler line.

Does the formula work for 3D triangles or higher dimensions?

Yes. The centroid of a triangle in three-dimensional space (or any higher-dimensional space) is still the average of the vertex coordinates, taken component by component: Gx = (x₁ + x₂ + x₃) / 3, Gy = (y₁ + y₂ + y₃) / 3, Gz = (z₁ + z₂ + z₃) / 3 for 3D. This calculator handles the 2D case; for 3D problems you can run the formula manually with each coordinate axis treated separately.

What if my three vertices are collinear?

If the three vertices lie on a single straight line they do not form a triangle — the figure has zero area and is called a degenerate triangle. There is no centroid in the geometric sense, because there are no medians to intersect (each "median" would lie on the same line as the vertices). The calculator detects this case via a zero shoelace area and reports the inputs as collinear rather than returning a centroid. Move at least one vertex off the line to recover a proper triangle.