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
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.
- 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.
- Use one unit for all six numbers. Lengths come back in that unit and the area in that unit squared.
- 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.
- 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.
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.
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.
Frequently asked questions.
How far is the centroid from each side of the triangle?
Why can't I average the corners of a quadrilateral?
How is the centroid different from the circumcentre, incentre and orthocentre?
Where does a triangular load on a beam act?
Does a line through the centroid always cut the triangle in half?
Can I find a median's length from the side lengths alone?
References& sources.
- [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]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]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]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
- Overseen by
- Daniel, Quanta Calculator Researcher
- 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