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

Centroid Calculator

Find a triangle's centroid from its three vertex coordinates, with all three median lengths, each corner's distance to the centroid 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
The x-coordinate of the centroid, the mean of the three vertex x-coordinates.
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.

Average the three x-coordinates of a triangle, average the three y-coordinates, and you have the point on which a triangular plate of even thickness balances. The shortcut belongs to triangles alone. Try it on four corners and the answer is usually off: for a trapezoid with corners (0, 0), (10, 0), (7, 4) and (3, 4), the corner average sits at height 2, but the plate balances at 12/7, about 1.7143, pulled down by the extra material along its wide base. That is why only three vertices are accepted here; shapes with more corners need the area-weighted formula of the irregular polygon area calculator.

In return for the simple formula a triangle offers a tidy set of relationships. All three medians, the lines from each corner to the midpoint of the opposite side, pass through the centroid, and it cuts each of them in the ratio 2:1, the longer piece on the corner's side. The results list all three median lengths and, separately, the straight-line distance from each corner to the centroid, so you can see the two-thirds rule hold in the numbers. The area comes with them.

Engineers use the point constantly, often without naming it. A load that rises steadily along a beam acts as one force through the centroid of its triangular load diagram, a third of the span from the heavy end. A triangular gusset lifted through a hole drilled at the centroid hangs level.

What is centroid calculator?

The centroid of a triangle, usually labelled G, is the point where its three medians meet. Its coordinates are the averages of the vertices' coordinates; in barycentric terms it gives each corner equal weight, (1, 1, 1), and Kimberling's catalogue of triangle centres lists it as X(2). Physically it is the centre of mass of a uniform triangular sheet, and equally of three equal weights placed at the corners. It is not the balance point of a triangle made of three wires; that point, the Spieker centre, coincides with the centroid only when the triangle is equilateral.

How to use this calculator.

  1. Enter the x and y coordinates of vertex A, then B and C. Negative values and decimals are fine, and the order of the corners does not change the centroid or the area.
  2. Use one unit for all six numbers. Lengths come back in that unit and the area in that unit squared.
  3. Read x̄ and ȳ for the balance point. Each median is labelled by the corner it starts from, so relabelling the corners only reshuffles the median and distance results.
  4. If the points are rejected, two of them coincide or all three lie on one straight line. Move one corner off the line.

The formula.

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

The centroid is x̄ = (x₁ + x₂ + x₃) ÷ 3 and ȳ = (y₁ + y₂ + y₃) ÷ 3. The 2:1 rule follows in one line of vector algebra. The midpoint of BC is M = (B + C) ÷ 2, and the point two thirds of the way from A to M is A + ⅔(M − A) = (A + B + C) ÷ 3, which is G; the same works from B and from C, so all three medians meet there. Each median length is the distance from a corner to the midpoint of the opposite side. The corner-to-centroid distances are measured directly from the coordinates rather than taken as two thirds of the median, so the ratio appears as a check. The area is ½|(x₂ − x₁)(y₃ − y₁) − (x₃ − x₁)(y₂ − y₁)|, the shoelace formula for three points, and the same determinant equal to exactly zero marks three collinear points, which enclose no triangle and are refused. MathWorld gives one more check: the three squared corner-to-centroid distances always add up to one third of a² + b² + c², where a, b and c are the side lengths.

A worked example.

Example

Take the 3-4-5 right triangle laid along the axes: A = (0, 0), B = (4, 0), C = (0, 3). The centroid is ((0 + 4 + 0) ÷ 3, (0 + 0 + 3) ÷ 3) = (4/3, 1), shown as 1.3333 and 1. The midpoint of BC is (2, 1.5), so the median from A is √(2² + 1.5²) = √6.25 = 2.5. The midpoint of CA is (0, 1.5), giving a median from B of √(4² + 1.5²) = √18.25 = 4.272; the midpoint of AB is (2, 0), giving a median from C of √(2² + 3²) = √13 = 3.6056. Measured straight from the corners, A is √((4/3)² + 1²) = 5/3 = 1.6667 from the centroid, B is 2.848 and C is 2.4037, and each is two thirds of its median: 2.5 × ⅔ = 1.6667. The area is ½ × |4 × 3 − 0 × 0| = 6. The median from A coming out at a round 2.5 is no accident. BC is the hypotenuse, 5 units long, and the median to a hypotenuse is always half of it.

y10
x10
y20
x24
y33
x30

Frequently asked questions.

How far is the centroid from each side of the triangle?
One third of the height measured from that side. In the 3-4-5 example the height above side AB is 3 and the centroid sits at y = 1; the width from side CA is 4 and the centroid sits at x = 4/3. That is why a triangle's centroid always lies well inside it.
Why can't I average the corners of a quadrilateral?
Because the material is not spread evenly between the corners. The trapezoid (0, 0), (10, 0), (7, 4), (3, 4) has a 10-unit base and a 4-unit top, so more of its area lies low down; its true centroid is at y = 12/7, about 1.7143, not the corner average of 2. Polygons need each part weighted by its area.
How is the centroid different from the circumcentre, incentre and orthocentre?
Each answers a different question. In the 3-4-5 example the centroid is (1.3333, 1); the incentre, equidistant from the sides, is (1, 1); the circumcentre, equidistant from the corners, is (2, 1.5); and the orthocentre, where the altitudes meet, is the right-angled corner (0, 0). Centroid, circumcentre and orthocentre lie on the Euler line, with the centroid a third of the way from circumcentre to orthocentre. All four coincide only in an equilateral triangle.
Where does a triangular load on a beam act?
Through the centroid of the load diagram. A load rising from 0 to 6 kN/m over 3 m totals ½ × 3 × 6 = 9 kN, and the triangle with corners (0, 0), (3, 0), (3, 6) has its centroid at x = 2, so the 9 kN acts 2 m from the light end, 1 m from the heavy end.
Does a line through the centroid always cut the triangle in half?
No. Lines from the centroid to the three corners do divide the triangle into three pieces of equal area, 2 each for the 6-unit example. But a line through the centroid parallel to a side cuts off a smaller triangle with sides two thirds as long, holding only 4/9 of the area.
Can I find a median's length from the side lengths alone?
Yes: mₐ = ½√(2b² + 2c² − a²), where a is the side opposite the corner. For the 3-4-5 triangle, a = 5, b = 3 and c = 4 give ½√(18 + 32 − 25) = ½√25 = 2.5, the same as the coordinate route.

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 for checking the coordinate-based median lengths the calculator returns. 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 the centroid result; applied to a quadrilateral it does not, which is why the calculator 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 the area output and for the exact collinearity test, which is the same determinant equal to zero. Open access.

How this page was produced

Published by
Quanta Calculator
Primary sources
4 cited below
Method
x̄ = (x₁ + x₂ + x₃) ⁄ 3 , ȳ = (y₁ + y₂ + y₃) ⁄ 3 , |AG| = ⅔mₐ
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

In this category

Embed

Quanta Pro

Paid features are coming later.

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