Centroid Calculator
Calculate the centroid (geometric center) of triangles and quadrilaterals from vertex coordinates.
Centroid Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Centroid = ((xโ+xโ+xโ)/3, (yโ+yโ+yโ)/3)
Worked example โ Centroid = (5.0, 5.333) | Area = 21 sq units | Perimeter = 21.58
Formula
Centroid = ((xโ+xโ+xโ)/3, (yโ+yโ+yโ)/3)
For a triangle, the centroid is the average of the three vertex coordinates. For a quadrilateral, the centroid is the area-weighted average of the centroids of two constituent triangles formed by a diagonal.
Worked Examples
Example 1: Triangle Centroid
Problem:Find the centroid of a triangle with vertices A(2, 4), B(8, 2), and C(5, 10).
Solution:Centroid x = (2 + 8 + 5) / 3 = 15 / 3 = 5.0 Centroid y = (4 + 2 + 10) / 3 = 16 / 3 = 5.333 Area = |2(2-10) + 8(10-4) + 5(4-2)| / 2 = |(-16) + 48 + 10| / 2 = 42 / 2 = 21 Perimeter: AB=6.32, BC=8.54, CA=6.71 โ Total=21.58
Result:Centroid = (5.0, 5.333) | Area = 21 sq units | Perimeter = 21.58
Example 2: Quadrilateral Centroid
Problem:Find the centroid of a quadrilateral with vertices A(0,0), B(6,0), C(8,5), D(2,7).
Solution:Split the quadrilateral along diagonal AC. Triangle 1 (A,B,C): Area = |0(0-5) + 6(5-0) + 8(0-0)|/2 = 30/2 = 15, Centroid = (4.667, 1.667) Triangle 2 (A,C,D): Area = |0(5-7) + 8(7-0) + 2(0-5)|/2 = 46/2 = 23, Centroid = (3.333, 4.0) Weighted Cx = (15ร4.667 + 23ร3.333)/(15+23) = 146.67/38 = 3.860 Weighted Cy = (15ร1.667 + 23ร4.0)/(15+23) = 117.00/38 = 3.079 Total area = 15 + 23 = 38 sq units (matches the shoelace formula)
Result:Centroid = (3.86, 3.08) | Area = 38 sq units
Frequently Asked Questions
What is the centroid of a shape?
The centroid is the geometric center of a shape, often described as the point where the shape would balance perfectly if placed on a pin. For a triangle, the centroid is the intersection of the three medians, which are lines drawn from each vertex to the midpoint of the opposite side. The centroid divides each median in a 2:1 ratio, with the longer segment being closer to the vertex. Mathematically, for a triangle with vertices (x1,y1), (x2,y2), and (x3,y3), the centroid is at ((x1+x2+x3)/3, (y1+y2+y3)/3). The centroid is one of four major triangle centers, along with the circumcenter, incenter, and orthocenter. For uniform density shapes, the centroid coincides with the center of mass. In engineering, centroids are essential for calculating bending stresses, deflections, and moments of inertia in structural members.
How is the centroid of a quadrilateral calculated?
Unlike triangles, there is no simple averaging formula for the centroid of a general quadrilateral. The correct method involves dividing the quadrilateral into two triangles by drawing a diagonal, computing the centroid of each triangle, then taking the weighted average of these two centroids where the weights are the areas of the respective triangles. The formula is: Cx = (A1 * Cx1 + A2 * Cx2) / (A1 + A2), and similarly for Cy, where A1 and A2 are the areas of the two triangles and (Cx1, Cy1) and (Cx2, Cy2) are their centroids. Simply averaging the four vertices gives the centroid only for parallelograms and is an approximation for other quadrilaterals. For convex quadrilaterals, either diagonal can be used to split into triangles and the result will be the same. For concave (non-convex) quadrilaterals, care must be taken to choose a diagonal that stays inside the shape.
What is the difference between centroid, center of mass, and center of gravity?
These three concepts are closely related but technically distinct. The centroid is a purely geometric property determined by the shape's outline, calculated without considering mass or material properties. The center of mass is the average position of mass in a body, accounting for density variations. The center of gravity is the point where gravitational force effectively acts on a body. For a uniform density object in a uniform gravitational field, all three coincide at the same point. They differ when the density varies across the object or when the gravitational field is non-uniform. For example, a wooden board with a metal weight attached on one end would have its center of mass shifted toward the metal, while its centroid remains at the geometric center. In most engineering and mathematics applications at human scales, the gravitational field is effectively uniform, so center of mass and center of gravity are treated as identical.
What is the shoelace formula and how does it relate to centroids?
The shoelace formula, also known as Gauss's area formula, calculates the area of a simple polygon given its vertex coordinates. For vertices listed in order (x1,y1), (x2,y2), ..., (xn,yn), the area is A = 0.5 * |sum of (xi * yi+1 - xi+1 * yi)|, where the last vertex wraps around to the first. It gets its name because the cross-multiplication pattern resembles lacing a shoe. The shoelace formula is essential for centroid calculations in two ways: first, it provides the area needed as a weighting factor when computing centroids of composite shapes by decomposing them into triangles. Second, the centroid formulas for general polygons use a similar cross-product structure. For a general polygon, the centroid coordinates are Cx = (1/6A) * sum of ((xi + xi+1)(xi*yi+1 - xi+1*yi)), and similarly for Cy. The formula produces a signed area, where positive indicates counterclockwise vertex ordering and negative indicates clockwise.
How are centroids used in engineering and architecture?
Centroids are fundamental to structural engineering, mechanical design, and architecture. In structural analysis, the centroid of a cross-section determines the neutral axis of a beam, which is the line along which there is no tensile or compressive stress during bending. The moment of inertia, which measures a section's resistance to bending, is always calculated about axes passing through the centroid. When designing columns, the centroid determines where the load should be applied to avoid eccentric loading and buckling. In architecture, understanding centroids helps determine the visual balance of facades and the structural stability of irregular building shapes. Civil engineers use centroid calculations to find the center of pressure on dams and retaining walls. In robotics and aerospace, the centroid and center of mass are critical for stability analysis and control system design. Even in everyday applications like CNC machining, the centroid determines the fixture point for balanced workholding.
How does the centroid relate to the circumcenter, incenter, and orthocenter?
All four are triangle centers but each is defined by a different set of lines. The centroid is where the medians meet, the circumcenter where the perpendicular bisectors meet, the incenter where the angle bisectors meet, and the orthocenter where the altitudes meet. The circumcenter, centroid, and orthocenter are always collinear on the Euler line, and the centroid sits one third of the way along it, dividing the segment from circumcenter to orthocenter in a 1:2 ratio. The incenter generally lies off that line. In an equilateral triangle all four collapse to a single point.
How are the median lengths reported by Centroid Calculator worked out?
A median runs from a vertex to the midpoint of the opposite side, so its length follows from the distance formula between the vertex and that midpoint. Apollonius's theorem gives the same value directly from the side lengths: the median to side a has length m_a = 0.5 * sqrt(2b^2 + 2c^2 - a^2). Because the centroid cuts every median in a 2:1 ratio measured from the vertex, the distance from a vertex to the centroid is two thirds of that median and the distance on to the opposite side is one third.
Why can splitting a concave quadrilateral along the wrong diagonal give a wrong centroid?
The two-triangle method assumes the chosen diagonal lies inside the shape so the triangles tile it exactly with no gaps or overlaps. In a concave quadrilateral, one vertex has a reflex interior angle and only one of the two diagonals stays inside; the other passes outside the outline. Splitting on that outside diagonal produces triangles that cover area the quadrilateral does not contain, and because the calculation uses unsigned areas the surplus is added instead of cancelled. Enter concave vertices so the diagonal from vertex 1 to vertex 3 lies within the shape.
How do you find the centroid of a composite section such as a T-beam or an I-beam?
Break the profile into simple rectangles, compute each rectangle's own area and centroid height, then take the area-weighted average: y_bar = sum(A_i * y_i) / sum(A_i), measuring every y from one common reference edge. Cut-outs, bolt holes, and web openings enter as negative areas at their own centroids. The resulting y_bar locates the neutral axis of the section, which is exactly where you must place the reference axis before computing the second moment of area used in bending stress calculations.
Where do the centroids of common curved shapes sit?
They are usually closer to the wide end than intuition suggests. A triangle's centroid lies one third of the perpendicular height above any side. A semicircular area of radius r has its centroid 4r / (3*pi), about 0.4244r, from the straight diameter edge. A half-disc of radius 6 therefore balances 2.546 units above its flat side. A rectangle, parallelogram, circle, or ellipse has its centroid at the intersection of its axes of symmetry, which is the general rule: any axis of symmetry must pass through the centroid.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎAnnulus Area Calculator
Calculate annulus area with inputs, formulas, and instant results.
๐งฎArea Calculator
Calculate area with inputs, formulas, and instant results.
๐งฎArea of a Rectangle Calculator
Calculate the area, perimeter, and diagonal of a rectangle. Find missing sides from known area. Convert between metric and imperial area units.
๐งฎArea of Crescent Calculator
Calculate area of crescent with inputs, formulas, and instant results.
๐งฎCenter of Mass Calculator
Calculate center of mass with inputs, formulas, and instant results.
๐งฎChord Length Calculator
Calculate chord length with inputs, formulas, and instant results.
๐งฎConic Sections Calculator
Calculate conic sections with inputs, formulas, and instant results.
๐งฎCross Sectional Area Calculator
Calculate cross sectional area with inputs, formulas, and instant results.