Last verified · v1.0
Calculator · math
Centroid Of A Triangle Calculator
Compute the centroid G of any triangle by entering the coordinates of all three vertices. Uses the formula Gx=(x1+x2+x3)/3, Gy=(y1+y2+y3)/3.
Inputs
Centroid Coordinate
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
What Is the Centroid of a Triangle?
The centroid of a triangle is the point where all three medians intersect. A median is a line segment connecting a vertex to the midpoint of the opposite side. Every triangle has exactly three medians, and they always meet at a single interior point labeled G. This point functions as the geometric center of the triangle and, for a uniform triangular lamina, also represents the center of mass.
The Centroid Formula
For a triangle with vertices A(x1, y1), B(x2, y2), and C(x3, y3) plotted on a Cartesian coordinate plane, the centroid G is defined as:
G = ( (x1 + x2 + x3) / 3, (y1 + y2 + y3) / 3 )
The formula computes the arithmetic mean of the three x-coordinates to obtain Gx and the arithmetic mean of the three y-coordinates to obtain Gy. This averaging process produces a single point that balances the triangle along both axes simultaneously. According to Paul's Online Math Notes — Calculus II: Center of Mass, this approach generalizes to the center of mass of any planar region through integration, with the triangle representing the most fundamental discrete case.
Derivation of the Formula
The centroid formula follows directly from a core geometric property: the centroid divides each median in a 2:1 ratio, measured from the vertex toward the midpoint of the opposite side. To derive Gx, let M be the midpoint of side BC:
- Midpoint M = ( (x2 + x3) / 2, (y2 + y3) / 2 )
- The centroid lies 2/3 of the way from vertex A to M along the median
- Gx = x1 + (2/3) x ((x2 + x3)/2 - x1) = (x1 + x2 + x3) / 3
The same logic applied to vertices B and C produces the identical result, confirming consistency across all three medians. The Penn State Mechanics Map — Centroid of an Area via Moment Integrals demonstrates how first moments of area extend this result to arbitrary 2D shapes, grounding the triangle formula within the broader field of mechanics.
Variable Reference
- x1, y1 — Cartesian coordinates of Vertex A
- x2, y2 — Cartesian coordinates of Vertex B
- x3, y3 — Cartesian coordinates of Vertex C
- Gx — x-coordinate of the centroid: (x1 + x2 + x3) / 3
- Gy — y-coordinate of the centroid: (y1 + y2 + y3) / 3
Worked Example
Find the centroid of a triangle with vertices A(1, 3), B(7, 1), and C(4, 9):
- Gx = (1 + 7 + 4) / 3 = 12 / 3 = 4
- Gy = (3 + 1 + 9) / 3 = 13 / 3 = 4.333
The centroid is G(4, 4.333). Quick verification: the x-value 4 falls between the minimum x of 1 and maximum x of 7; the y-value 4.333 falls between the y-minimum of 1 and y-maximum of 9. Both coordinates lie within the triangle's bounding box, confirming the result is geometrically correct.
Real-World Applications
The triangle centroid appears across multiple professional disciplines:
- Structural Engineering: Centroid calculations determine the neutral axis of beam cross-sections, which is essential for computing bending stress using the flexure formula sigma = Mc/I, preventing structural failure under load.
- Aerospace and Aviation: The NASA Glenn Research Center documents how the center of gravity — directly related to the centroid for uniform bodies — governs aircraft stability, pitch trim, and control surface effectiveness throughout the flight envelope.
- Computer Graphics and GIS: Triangle mesh algorithms use centroid coordinates for texture interpolation, ray-triangle intersection tests, and geographic data aggregation within polygonal regions on digital maps.
- Physics: A uniform triangular plate balances perfectly on a pin placed at its centroid, making this point critical for equilibrium and torque analysis in introductory and advanced mechanics.
- Architecture and Construction: Load distribution calculations for triangular roof panels and truss gusset plates rely on accurate centroid locations to ensure forces transfer safely through the structure.
Key Geometric Properties
- The centroid always lies inside the triangle for all triangle types — acute, right, and obtuse — unlike the circumcenter or orthocenter.
- Each median is divided by the centroid in a 2:1 ratio from the vertex to the opposite midpoint.
- The centroid is the unique point that minimizes the sum of squared distances to all three vertices.
- For an equilateral triangle with side length a, the centroid lies exactly a x sqrt(3) / 6 from each side.
Reference