Audited 29 Jul 2026·Last updated 31 Jul 2026·4 citations·Tier 2·0 uses

Centroid Calculator

Find the centroid of a triangle from its three vertex coordinates. Returns the centroid point, all three median lengths, the 2:1 distances and the area.

Centroid Calculator

Negative coordinates are fine — they just describe points left of the y-axis.
The first corner of the triangle. Order does not affect the centroid or the area.
The second corner. It must not be the same point as A.
Use the same unit for every coordinate — the results come back in it.
The third corner. This page takes exactly three vertices; for a polygon with four or more, use the irregular polygon area calculator, whose centroid is a different point.
All three points must not lie on one straight line — collinear points enclose no triangle and are rejected.
Centroid x̄
1.3333
(x₁ + x₂ + x₃) ÷ 3. The centroid is the triangle's balance point: cut the triangle out of card and it balances on a pin placed here. Its homogeneous barycentric coordinates are (1, 1, 1), which is exactly what makes it the plain average of the corners.
Centroid ȳ
1
Median from A (mₐ)
2.5
Median from B (m_b)
4.272
Median from C (m_c)
3.6056
Distance A → centroid
1.6667
Distance B → centroid
2.848
Distance C → centroid
2.4037
Triangle area
6

Background.

The Quanta centroid calculator finds the balance point of a triangle from its three vertex coordinates, and shows the working: all three median lengths, the distance from each corner to the centroid, and the triangle's area. With the default triangle — (0, 0), (4, 0) and (0, 3), the familiar 3-4-5 right triangle laid on the axes — the centroid comes back at (1.3333333333, 1), the medians as 2.5, 4.2720018727 and 3.6055512755, and the area as exactly 6.

The centroid itself is the simplest formula in plane geometry: average the x-coordinates, average the y-coordinates, done. What makes it worth a page is everything that follows from it. The three medians — each running from a corner to the midpoint of the opposite side — all pass through that single point, and each is cut by it in the ratio 2:1, with the long part on the vertex side. This calculator measures those distances directly from the coordinates rather than multiplying the medians by two thirds, so the 2:1 rule appears as a result you can check rather than an assumption baked in.

The centroid is the triangle's centre of mass, and that is a stronger statement than it sounds. Cut the triangle out of uniform card and it balances on a pin stuck through this point, in any orientation. It is also the balance point of the three corners taken as three equal weights, and the balance point of the three sides taken as three uniform wires only when the triangle is equilateral. The first two coincide for a triangle; the third does not, and neither does the corner average for any shape with more than three corners.

That last caveat matters enough to sit here rather than in a footnote. For a triangle the average of the corners is genuinely the centre of mass of the solid region — but only for a triangle. Take the trapezoid with corners (0, 0), (10, 0), (7, 4) and (3, 4): averaging its four corners gives a y-coordinate of 2, while the true centre of mass of the plate is at y = 1.7142857143. The average of the corners is off by nearly three tenths of a unit, because the shape has more area near the wide bottom than the corners alone reveal. This page therefore takes exactly three vertices and sends polygons to the irregular polygon area calculator, which uses the properly weighted formula.

One more distinction worth having straight before you read the answer: the centroid is not the only centre a triangle has. The circumcentre is equidistant from the three vertices and is the centre of the circle through them; the incentre is equidistant from the three sides; the orthocentre is where the altitudes meet. For the default triangle here the centroid is at (1.3333333333, 1) while the circumcentre is at (2, 1.5) — different points, answering different questions. If you want the circle through three points rather than their balance point, the circumscribed circle calculator is the page you want.

What is centroid calculator?

The centroid of a triangle is the point where its three medians meet, and it is the geometric centre of mass of the triangle. Wolfram MathWorld describes it as "the point which is also the intersection of the triangle's three triangle medians" and gives it homogeneous barycentric coordinates (1, 1, 1) — Kimberling centre X(2). Barycentric coordinates of (1 : 1 : 1) mean the three vertices carry equal weight, which normalises to one third each, so the centroid is simply

x̄ = (x₁ + x₂ + x₃) ÷ 3 and ȳ = (y₁ + y₂ + y₃) ÷ 3.

A median is the segment from a vertex to the midpoint of the opposite side. Every triangle has three, they are always concurrent, and MathWorld states the division rule plainly: "the centroid is located 2/3 of the way from each polygon vertex to the midpoint of the opposite side", equivalently "the medians of a triangle divide one another in the ratio 2:1". A median's length also has a closed form in terms of the sides alone — MathWorld's Triangle Median Equation (1), mₐ² = ¼(2b² + 2c² − a²) — which is the formula this calculator's test suite checks its coordinate answers against on every run.

The word centroid carries a second, broader meaning: the centre of mass of any region. For a triangle the two meanings agree, which is a genuine theorem rather than a definition. For a general polygon they part company, and the correct formula is the area-weighted one at MathWorld's Geometric Centroid Equations (8) and (9), where each edge contributes in proportion to the signed area it sweeps. Averaging the corners of a quadrilateral gives a point that is usually not its balance point at all.

Finally, the centroid should not be confused with the other classical triangle centres. It is the balance point, but the circumcentre is the point equidistant from the three vertices, the incentre is equidistant from the three sides, and the orthocentre is where the three altitudes meet. All four coincide only in an equilateral triangle. In every other triangle the centroid, circumcentre and orthocentre are distinct — though they always lie on one straight line, the Euler line, with the centroid exactly one third of the way from the circumcentre to the orthocentre.

How to use this calculator.

  1. Enter the x and y coordinates of vertex A. Any real numbers work, including negatives and decimals — a negative x simply means the point sits left of the y-axis.
  2. Enter vertices B and C the same way. Use the same unit for all six numbers; lengths come back in that unit and the area in that unit squared.
  3. Order does not matter for the centroid or the area. It only decides which median gets which label, since each median is named after the vertex it starts from.
  4. Read the centroid coordinates at the top. That single point is where the triangle balances, and where all three medians cross.
  5. Read the three median lengths if you are drawing or constructing the triangle. Each is the full segment from a corner to the midpoint of the far side.
  6. Compare each vertex-to-centroid distance with its median: the ratio is always exactly two thirds. If you are checking your own working by hand, that is the fastest place to spot an arithmetic slip.
  7. If the calculator rejects your points, they are either duplicated or collinear. Three points on one straight line enclose no triangle, so there is nothing to balance; nudge one of them off the line.
  8. For a shape with four or more corners, do not average the corners — use the irregular polygon area calculator, which returns the properly area-weighted centroid.

The formula.

x̄ = (x₁ + x₂ + x₃) ⁄ 3 , ȳ = (y₁ + y₂ + y₃) ⁄ 3 , |AG| = ⅔mₐ

The centroid is the arithmetic mean of the three vertices. That falls straight out of the barycentric description: MathWorld gives the triangle centroid homogeneous barycentric coordinates (1, 1, 1), meaning the three corners carry equal weight, and equal weights normalise to one third each. So x̄ = (x₁ + x₂ + x₃) ÷ 3 and ȳ = (y₁ + y₂ + y₃) ÷ 3, with no square roots and no trigonometry anywhere.

Each median is then an ordinary distance. The median from A ends at the midpoint of BC, which is ((x₂ + x₃) ÷ 2, (y₂ + y₃) ÷ 2), so its length is the distance from A to that point. The vertex-to-centroid distances are computed the same way, straight from the coordinates — deliberately not as two thirds of the median, so that the 2:1 rule remains something the answer demonstrates rather than something the code assumes. The area comes from the shoelace determinant on three points, ½|(x₂ − x₁)(y₃ − y₁) − (x₃ − x₁)(y₂ − y₁)|.

Working the default all the way through: A = (0, 0), B = (4, 0), C = (0, 3). The centroid is ((0 + 4 + 0) ÷ 3, (0 + 0 + 3) ÷ 3) = (4/3, 1), displayed as 1.3333333333 and 1. The midpoint of BC is (2, 1.5), so the median from A is √(2² + 1.5²) = √6.25 = 2.5 exactly — and that exactness is not luck: BC is the hypotenuse of a right triangle whose right angle is at A, and the median to a hypotenuse is always half the hypotenuse, so 5 ÷ 2 = 2.5. The midpoint of CA is (0, 1.5), giving a median from B of √(4² + 1.5²) = √18.25 = 4.2720018727. The midpoint of AB is (2, 0), giving a median from C of √(2² + 3²) = √13 = 3.6055512755. The distance from A to the centroid is √((4/3)² + 1²) = √(25/9) = 5/3 = 1.6666666667, which is exactly two thirds of 2.5. The area is ½|(4 − 0)(3 − 0) − (0 − 0)(0 − 0)| = ½ × 12 = 6.

The same numbers can be reached without ever using a coordinate. MathWorld's Triangle Median Equation (1) gives mₐ² = ¼(2b² + 2c² − a²) from the side lengths alone, and with a = 5, b = 3, c = 4 that is ¼(18 + 32 − 25) = ¼ × 25, so mₐ = 2.5. The same formula gives m_b = ½√73 = 4.272001873 and m_c = ½√52 = 3.605551275. Equation (2) provides a further check: the three medians squared sum to 6.25 + 18.25 + 13 = 37.5, and ¾(25 + 9 + 16) = ¾ × 50 = 37.5. Two independent routes, identical digits.

Rounding stage: every intermediate is carried at 40 significant digits and rounded once, at the return boundary, to 10 decimal places. The centroid is not rounded before the three vertex-to-centroid distances are measured from it — with a centroid x of 4/3, rounding first would leave the 2:1 identity failing in the tenth decimal place. The collinearity test is exact rather than tolerance-based: the determinant must be precisely zero in 40-digit arithmetic to be rejected, so a genuinely thin but real triangle still computes. Nothing on this page is sorted into bands or graded, so no wording depends on a rounded value.

A worked example.

Example

A fabricator is cutting a triangular steel gusset plate and needs to know where to drill the single lifting hole so the plate hangs level. The corners, measured from the bottom-left in inches, are (0, 0), (4, 0) and (0, 3). Entering those six numbers returns a centroid of (1.3333333333, 1), so the hole goes 1⅓ inches right of the left edge and 1 inch up from the bottom — and because the centroid is the centre of mass of a uniform plate, that is exactly the point the plate will hang from without tilting, whichever way it is turned. The area comes back as exactly 6 square inches, which at ¼-inch mild steel is about 0.43 pounds, so a single sling is plenty. The three medians are 2.5, 4.2720018727 and 3.6055512755 inches; the first is exact for a reason worth checking on the drawing, because the corner at (0, 0) is a right angle and the median to a hypotenuse is always half the hypotenuse, so 5 ÷ 2 = 2.5. The distances from each corner to the drill point come back as 1.6666666667, 2.8480012484 and 2.4037008503 inches, and each of those is precisely two thirds of the median it belongs to — 2.5 × ⅔ = 1.6666666667 — which is the fastest way to check the layout before committing a drill bit. One thing this point is not: the centre of the circle through the three corners. That circle is centred at (2, 1.5), two-thirds of an inch further right and half an inch higher, and it is where you would drill if the job were to scribe an arc through all three corners rather than to balance the plate.

y10
x10
y20
x24
y33
x30

Frequently asked questions.

What is the formula for the centroid of a triangle?
Average the coordinates: x̄ = (x₁ + x₂ + x₃) ÷ 3 and ȳ = (y₁ + y₂ + y₃) ÷ 3. That is all of it — no square roots, no trigonometry. The reason it is so simple is that the centroid has homogeneous barycentric coordinates (1, 1, 1), meaning the three vertices carry equal weight, and equal weights normalise to one third each. For the default triangle (0, 0), (4, 0), (0, 3) that gives ((0 + 4 + 0) ÷ 3, (0 + 0 + 3) ÷ 3) = (1.3333333333, 1).
Why is the centroid two thirds of the way along each median?
It is a theorem, and this page lets you watch it happen rather than assuming it. MathWorld states that "the centroid is located 2/3 of the way from each polygon vertex to the midpoint of the opposite side", so each median is cut in the ratio 2:1 with the long piece nearest the vertex. The calculator measures each vertex-to-centroid distance directly from the coordinates and never multiplies a median by two thirds — yet the results always come out that way. For the default triangle the median from A is 2.5 and the distance from A to the centroid is 1.6666666667, which is 2.5 × ⅔ exactly.
Is the centroid the same as the centre of mass?
For a triangle, yes, and that is a real theorem rather than a definition. Cut a triangle out of uniform card and it balances on a pin through this point in any orientation, so it is simultaneously the average of the three corners and the centre of mass of the solid region. For shapes with four or more corners the two stop agreeing. Take the trapezoid with corners (0, 0), (10, 0), (7, 4) and (3, 4): averaging the corners gives y = 2, but the true centre of mass of the plate is at y = 1.7142857143, because the shape carries more area near its wide bottom edge than the corner positions alone reveal. That is why this page takes exactly three vertices, and why polygons belong on the irregular polygon area calculator.
What is the difference between the centroid, the circumcentre, the incentre and the orthocentre?
They answer four different questions. The centroid is where the medians meet and is the balance point. The circumcentre is where the perpendicular bisectors of the sides meet and is equidistant from the three vertices, so it is the centre of the circle drawn through them. The incentre is where the angle bisectors meet and is equidistant from the three sides, so it is the centre of the largest circle that fits inside. The orthocentre is where the three altitudes meet. All four land on the same point only in an equilateral triangle. For the default triangle here, the centroid is at (1.3333333333, 1) and the circumcentre at (2, 1.5) — clearly different points. The centroid, circumcentre and orthocentre always lie on one straight line, the Euler line, with the centroid one third of the way from the circumcentre to the orthocentre.
How do I find the length of a triangle's median?
From coordinates it is just a distance: the median from A runs to the midpoint of BC, which is ((x₂ + x₃) ÷ 2, (y₂ + y₃) ÷ 2), so measure from A to that point. If all you have are the three side lengths, MathWorld's Triangle Median Equation (1) gives mₐ = ½√(2b² + 2c² − a²), where a is the side opposite A. Both routes are used here: the calculator reports the coordinate answer and its test suite checks it against the side-length formula on every run. For the default triangle, with a = 5, b = 3 and c = 4, the formula gives ½√(18 + 32 − 25) = ½√25 = 2.5, matching the coordinate result exactly.
Why does the calculator reject my three points?
Either two of them are the same point, or all three lie on one straight line. Collinear points enclose no area, so there is no triangle to balance and no medians to intersect — the determinant that gives twice the area comes out as exactly zero. The test is exact rather than approximate, so a genuinely thin triangle still computes: (0, 0), (2, 2) and (4, 4.0000001) is accepted and returns a tiny positive area, while (0, 0), (2, 2) and (4, 4) is refused.
Can I use negative coordinates?
Yes. Negative x and y values simply place points left of the y-axis or below the x-axis, and they are as valid as any others. The centroid formula averages them without any special handling, and the area output takes the absolute value of the determinant, so it stays positive no matter which way round you enter the vertices. Entering (−3, −4), (5, −1) and (2, 6) returns a centroid of (1.3333333333, 0.3333333333).

References& sources.

  1. [1]Wolfram Research, MathWorld — ‘Triangle Centroid’ (live revision retrieved 2026-07-29). Source for the definition as the intersection of the three medians, the homogeneous barycentric coordinates (1, 1, 1) identifying it as Kimberling centre X(2), the statement that ‘the centroid is located 2/3 of the way from each polygon vertex to the midpoint of the opposite side’, and Equation (4), AG² + BG² + CG² = ⅓(a² + b² + c²). Open access.
  2. [2]Wolfram Research, MathWorld — ‘Triangle Median’ (live revision retrieved 2026-07-29). Equation (1), m₁² = ¼(2a₂² + 2a₃² − a₁²), gives a median's length from the three side lengths alone, and Equation (2) gives m₁² + m₂² + m₃² = ¾(a₁² + a₂² + a₃²). This is the independent derivation used to check the coordinate-based median lengths this calculator returns; both equations are asserted in centroid.test.ts. Open access.
  3. [3]Wolfram Research, MathWorld — ‘Geometric Centroid’ (live revision retrieved 2026-07-29). Equations (8) and (9) give the area-weighted centroid of a polygon lamina, x̄ = 1/(6A) Σ (xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ) and the matching expression for ȳ. Applied to a triangle it reproduces the average of the vertices exactly, which is the second independent check on this page; applied to a quadrilateral it does not, which is why this page is limited to three vertices. Open access.
  4. [4]Wolfram Research, MathWorld — ‘Polygon Area’ (live revision retrieved 2026-07-29). Equation (4), A = ½ Σ (xᵢyᵢ₊₁ − xᵢ₊₁yᵢ), the shoelace formula, stated for ‘a planar non-self-intersecting polygon’. Source for this page's area output and for the exact collinearity test, which is the same determinant equal to zero. Open access.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 977 calculators remain free
  • No billing is enabled
Coming soon