Logo

MonoCalc

/

Centroid of Triangle

Geometry

Vertex A

X

Y

Vertex B

X

Y

Vertex C

X

Y

Decimal Precision (0–10)

Centroid G (Gx, Gy)

(3.0000, 2.0000)

Centroid X (Gx)

3.0000

Centroid Y (Gy)

2.0000

Median Lengths & Area

Median from A5.4083
Median from B5.4083
Median from C6.0000
Triangle Area18.0000 sq units

Formula Breakdown

Gx = (0 + 6 + 3) / 3 = 3.0000

Gy = (0 + 0 + 6) / 3 = 2.0000

Triangle Diagram

ABCG

About This Tool

Centroid of Triangle Calculator – Instant Geometric Center

The centroid of a triangle is the point where all three medians intersect. A median is the line segment connecting a vertex to the midpoint of the opposite side. The centroid is commonly denoted G and is one of the most important triangle centers in geometry, physics, and engineering.

The Centroid Formula

Given a triangle with vertices A(x₁, y₁), B(x₂, y₂), and C(x₃, y₃), the centroid G is simply the arithmetic mean of the three vertex coordinates:

Gx = (x₁ + x₂ + x₃) / 3

Gy = (y₁ + y₂ + y₃) / 3

This elegant formula comes directly from the property that the centroid divides each median in the ratio 2 : 1 from vertex to midpoint. Adding the three vertex coordinates and dividing by three is algebraically equivalent to finding that 2/3 point along every median simultaneously.

Step-by-Step Example

Consider triangle A(0, 0), B(6, 0), C(3, 6):

  • Gx = (0 + 6 + 3) / 3 = 9 / 3 = 3
  • Gy = (0 + 0 + 6) / 3 = 6 / 3 = 2
  • Centroid G = (3, 2)

You can verify this by finding the midpoint of each side and confirming that the line from each vertex to the opposite midpoint passes through (3, 2).

Median Lengths

Each median connects a vertex to the midpoint of the opposite side. To compute the midpoints:

  • Midpoint of BC = ((x₂ + x₃) / 2, (y₂ + y₃) / 2)
  • Midpoint of AC = ((x₁ + x₃) / 2, (y₁ + y₃) / 2)
  • Midpoint of AB = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)

The length of each median is then the straight-line (Euclidean) distance from a vertex to its corresponding midpoint, using d = √(Δx² + Δy²). This calculator displays all three median lengths alongside the centroid result.

Triangle Area via Shoelace Formula

The calculator also reports the triangle's area using the shoelace (surveyor's) formula:

Area = |x₁(y₂ − y₃) + x₂(y₃ − y₁) + x₃(y₁ − y₂)| / 2

The area is used internally to detect collinear points: when the area is effectively zero (less than 10⁻¹⁰), the three vertices lie on a line and no valid triangle exists. The tool displays a clear warning in this case.

Practical Applications

  • Physics and engineering — the centroid equals the center of mass of a uniform triangular plate, making it the balance point for load analysis
  • Structural engineering — triangular cross-sections and trusses require centroid coordinates to apply bending formulas correctly
  • Computer graphics and CAD — collision detection, sprite centering, and mesh analysis often rely on polygon centroids
  • Coordinate geometry education — the centroid is a foundational topic in analytic geometry, appearing in textbooks worldwide
  • GIS and surveying — the centroid of a triangulated irregular network (TIN) tile is used for interpolation and data aggregation

The Centroid Always Lies Inside the Triangle

Unlike the circumcenter and orthocenter, which can lie outside an obtuse triangle, the centroid is always strictly inside the triangle. This is because it is a weighted average of all interior points, so it can never fall outside the convex hull of the three vertices.

Collinear Points and Degenerate Cases

If you enter three vertices that lie on a straight line — for example A(0, 0), B(1, 1), C(2, 2) — the triangle has zero area and no valid centroid exists. The calculator detects this automatically and displays a warning instead of a meaningless result. Two identical vertices also produce zero area and trigger the same validation message.

Adjustable Decimal Precision

You can control the number of decimal places displayed (0 to 10) using the Decimal Precision field. This is especially helpful when working with large-scale engineering coordinates where four or more decimal places are needed, or when a whole-number result is sufficient for a quick check. All computations use JavaScript's 64-bit double-precision arithmetic, delivering approximately 15 significant figures internally.

Frequently Asked Questions

Is the Centroid of Triangle free?

Yes, Centroid of Triangle is totally free :)

Can I use the Centroid of Triangle offline?

Yes, you can install the webapp as PWA.

Is it safe to use Centroid of Triangle?

Yes, any data related to Centroid of Triangle only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is a centroid?

The centroid of a triangle is the point where all three medians intersect. A median connects a vertex to the midpoint of the opposite side. The centroid is also known as the triangle's center of gravity — for a uniform triangular plate, it is the exact point at which the plate would balance on a pin.

How does this centroid calculator work?

Enter the Cartesian coordinates of all three vertices (x₁, y₁), (x₂, y₂), and (x₃, y₃). The calculator instantly computes the centroid using the formula Gx = (x₁ + x₂ + x₃) / 3 and Gy = (y₁ + y₂ + y₃) / 3. It also calculates all three median lengths, the triangle's area, and draws an SVG diagram.

Is the centroid always inside the triangle?

Yes. For any non-degenerate triangle, the centroid always lies strictly inside the triangle, regardless of whether the triangle is acute, right, or obtuse. This is in contrast to the circumcenter (which can lie outside an obtuse triangle) and the orthocenter (which lies outside for obtuse triangles).

How does the centroid differ from the circumcenter and incenter?

The centroid (intersection of medians) is the center of mass. The circumcenter (intersection of perpendicular bisectors) is equidistant from all three vertices and is the center of the circumscribed circle. The incenter (intersection of angle bisectors) is equidistant from all three sides and is the center of the inscribed circle. All three coincide only for equilateral triangles.

What happens when all three points are collinear?

If the three vertices are collinear — all lying on the same straight line — no valid triangle is formed. The calculator detects this condition when the triangle's area is less than 1×10⁻¹⁰ and displays a warning. A centroid is only meaningful for a triangle with positive area.

How accurate are the results?

All calculations use JavaScript's 64-bit floating-point arithmetic (IEEE 754 double precision), providing approximately 15 significant digits. You can adjust the displayed decimal precision from 0 to 10 places using the Decimal Precision control. The underlying computation is exact to floating-point precision.