Skip to main content

Centroid Calculator

Free Centroid Calculator for 2d geometry. Enter values to get step-by-step solutions with formulas and graphs. Get results you can export or share.

Skip to calculator
Mathematics

Centroid Calculator

Calculate the centroid (geometric center) of triangles and quadrilaterals from vertex coordinates. Includes area, perimeter, medians, and step-by-step solutions.

Last updated: December 2025Reviewed by NovaCalculator Mathematics Team

Calculator

Adjust values & calculate
Understand the Math

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.

Last reviewed: December 2025

Worked Examples

Example 1: Triangle Centroid

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

Find the centroid of a quadrilateral with vertices A(0,0), B(6,0), C(8,5), D(2,7).
Solution:
Triangle 1 (A,B,C): Area = 15, Centroid = (4.667, 1.667) Triangle 2 (A,C,D): Area = 18, Centroid = (3.333, 4.0) Weighted Cx = (15ร—4.667 + 18ร—3.333)/(15+18) = 3.939 Weighted Cy = (15ร—1.667 + 18ร—4.0)/(15+18) = 2.939 Total area = 33 sq units
Result: Centroid = (3.94, 2.94) | Area = 33 sq units
Expert Insights

Background & Theory

The Centroid Calculator applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.

History

The history behind the Centroid Calculator traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.

Share this calculator

Explore More

Frequently Asked Questions

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.
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.
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.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.
No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Mathematics Team โ€” Verified against standard mathematical and scientific references. Last reviewed: December 2025. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

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\nCentroid y = (4 + 2 + 10) / 3 = 16 / 3 = 5.333\nArea = |2(2-10) + 8(10-4) + 5(4-2)| / 2\n = |(-16) + 48 + 10| / 2 = 42 / 2 = 21\nPerimeter: 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: Triangle 1 (A,B,C): Area = 15, Centroid = (4.667, 1.667)\nTriangle 2 (A,C,D): Area = 18, Centroid = (3.333, 4.0)\nWeighted Cx = (15ร—4.667 + 18ร—3.333)/(15+18) = 3.939\nWeighted Cy = (15ร—1.667 + 18ร—4.0)/(15+18) = 2.939\nTotal area = 33 sq units

Result: Centroid = (3.94, 2.94) | Area = 33 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.

How accurate are the results from Centroid Calculator?

All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.

Does Centroid Calculator work offline?

Once the page is loaded, the calculation logic runs entirely in your browser. If you have already opened the page, most calculators will continue to work even if your internet connection is lost, since no server requests are needed for computation.

Why might my result differ from another tool or reference?

Differences typically arise from rounding conventions, the specific version of a formula (for example, simple vs compound interest), or unit inconsistencies between inputs. Check that both tools are using the same formula variant and the same units. The References section links to the authoritative source behind the formula used here.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy