Centroid Calculator

Find the geometric center of triangles, polygons, and point sets

Find the centroid (geometric center) of triangles, polygons, and point sets. Enter coordinates to get the exact center point for engineering design, computer graphics, or geometric analysis.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Think of the centroid as the balance point of a shape cut from cardboard. If you could place a pin exactly at the centroid, the shape would balance perfectly without tipping. Mathematically, it is the arithmetic average of all the vertex coordinates - add up all the x-coordinates and divide by the number of points, then do the same for y-coordinates.

The calculation works by treating each vertex as equally important, regardless of the shape's area or side lengths. For a triangle with vertices at (0,0), (6,0), and (3,4), the centroid x-coordinate is (0+6+3)/3 = 3, and the y-coordinate is (0+0+4)/3 = 1.33. This averaging principle applies whether you have a simple triangle or a complex polygon.

What makes centroids particularly useful is their geometric stability. The centroid location depends only on the vertex positions, not on how you draw the connecting lines between them. This property makes centroids essential for computer graphics, where objects need consistent reference points for rotation, scaling, and positioning operations.

When To Use This
Right tool, right situation

Use centroid calculations when you need the geometric center for positioning, balancing, or visual design. CAD software relies on centroids for placing dimension lines, text labels, and reference points. In manufacturing, centroids determine where to place support points for machining operations or where to grip parts during assembly.

Centroid calculations work best for solid, uniform shapes where every point has equal importance. Avoid using simple coordinate averaging for shapes with significant thickness variations, hollow sections, or non-uniform material density. A steel I-beam, for example, needs area-weighted calculations because the flanges contain more material than the web section.

For data analysis and visualization, centroids help identify cluster centers in scatter plots or average locations in geographic datasets. However, recognize that the centroid might fall outside the actual data range - the center of a C-shaped point distribution could lie in empty space where no actual data points exist.

Common Mistakes
Why results sometimes look wrong

The most common error is confusing centroid with other center types. Students often use area-weighted methods when they should use simple coordinate averaging. For basic polygons, each vertex counts equally regardless of the distances between them - a triangle with sides of 3, 4, and 5 units has the same centroid calculation as one with sides of 30, 40, and 50 units if the vertices are at the same coordinates.

Another frequent mistake occurs when working with coordinate systems. Some people forget that negative coordinates are perfectly valid and follow the same averaging rules. A triangle with vertices at (-2, -1), (4, 3), and (1, -2) has a centroid at (1, 0), not at some positive-only location. The mathematics does not distinguish between positive and negative values.

Precision errors compound when working with many decimal places. Always round your final answer appropriately for your application - architectural drawings might need accuracy to 1/8 inch, while computer graphics often work fine with single decimal precision. Carrying too many decimal places through intermediate calculations can create false precision that misleads decision-making.

The Math
Worked examples and deeper derivation

The centroid formula for any polygon is remarkably straightforward: Cx = (x1 + x2 + ... + xn)/n and Cy = (y1 + y2 + ... + yn)/n, where n is the number of vertices. This simple averaging works because we assume uniform density across the entire shape - every point contributes equally to the final location.

For triangles specifically, the centroid has a special property: it lies exactly two-thirds of the distance from each vertex to the midpoint of the opposite side. This creates the famous 2:1 ratio that appears in triangle geometry. If you draw lines from each vertex to the opposite side's midpoint, all three lines intersect at the centroid.

The distance calculation from the centroid to the origin uses the standard Pythagorean theorem: distance = √(Cx² + Cy²). This distance measurement proves useful in optimization problems where you want to minimize the total distance from the centroid to a reference point, such as placing a facility to serve multiple locations efficiently.

Triangle Centroid for CAD Design
Triangle with vertices at (0,0), (6,0), and (3,4)
The centroid is at (3, 1.333). This is exactly where you would place a support point to balance the triangular part, or where to position text labels for maximum visual balance in technical drawings.
Quadrilateral Center for Layout
Rectangle with corners at (0,0), (8,0), (8,5), and (0,5)
The centroid is at (4, 2.5). For UI design or architectural layouts, this center point ensures visual elements are perfectly balanced within the rectangular space.
Point Cloud Analysis
Five data points: (1,2), (3,4), (5,1), (2,6), (4,3)
The centroid is at (3, 3.2). In data visualization or geographic analysis, this represents the central tendency of your point distribution, useful for placing summary statistics or cluster centers.
Expert Unlock
The thing most explanations skip

Professional engineers distinguish between centroid and center of gravity based on material distribution. While coordinate averaging works for uniform shapes, real-world applications often require area moments or mass-weighted calculations for accurate load analysis.

How do you find the centroid of different shapes?

What is the difference between centroid and center of mass?
For uniform shapes, the centroid and center of mass are identical. The centroid is purely geometric - the average of all coordinate points. Center of mass considers weight distribution, which matters for engineering applications but not for geometric calculations.
How accurate is the centroid calculation for irregular shapes?
For simple polygons, the point-averaging method gives the exact centroid. For complex irregular shapes with curves or holes, you would need integration methods or specialized software. This calculator handles straight-sided polygons perfectly.
Can I use negative coordinates in the centroid calculator?
Yes, negative coordinates work perfectly. The centroid calculation averages all x and y values regardless of sign. This is common when working with coordinate systems that extend in all four quadrants.

Need something this doesn't cover?

Suggest a tool — we'll build it →