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
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.
- 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.
- 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.
- 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.
- Read the centroid coordinates at the top. That single point is where the triangle balances, and where all three medians cross.
- 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.
- 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.
- 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.
- 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.
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.
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.
Frequently asked questions.
What is the formula for the centroid of a triangle?
Why is the centroid two thirds of the way along each median?
Is the centroid the same as the centre of mass?
What is the difference between the centroid, the circumcentre, the incentre and the orthocentre?
How do I find the length of a triangle's median?
Why does the calculator reject my three points?
Can I use negative coordinates?
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 used to check the coordinate-based median lengths this calculator returns; both equations are asserted in centroid.test.ts. 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 this page; applied to a quadrilateral it does not, which is why this page 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 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