Built and fact-checked by the DocNectar team — see our editorial standards
Key Features
Instant Calculation
Get accurate results in real time with our optimized algorithm.
Mobile Friendly
Fully responsive design. Works on all devices & screen sizes.
Privacy Focused
Your data stays on your device. We don't store any inputs.
100% Free
No hidden costs. This tool is completely free forever.
A polygon's centroid is its geometric "center of area" — the balance point of the shape if it were cut from a uniform sheet of material and balanced on a pin. It's distinct from simply averaging the vertex coordinates, since a plain vertex average treats every corner equally, while the true centroid properly weights by exactly how the polygon's area is spread out, giving more influence to regions with more actual interior area nearby. Centroids matter wherever a shape's mass or area needs to be treated as concentrated at a single representative point: structural engineers use a cross-section's centroid to compute bending stresses in beams, CAD and CNC systems use it to center a part for machining or 3D printing, and computer graphics uses polygon centroids for placing labels, computing physics simulations, and mesh processing.
How it works
Choose the number of vertices (3 to 10) and enter each (x, y) coordinate in order around the polygon. The calculator first computes the polygon's signed area A using the Shoelace formula, then applies the centroid formulas Cx = (1/6A)·Σ(xᵢ+xᵢ₊₁)(xᵢyᵢ₊₁−xᵢ₊₁yᵢ) and Cy = (1/6A)·Σ(yᵢ+yᵢ₊₁)(xᵢyᵢ₊₁−xᵢ₊₁yᵢ), summing over each consecutive pair of vertices (wrapping the last vertex back to the first). These formulas essentially break the polygon into thin triangular wedges from the origin, weight each wedge's contribution by both its area and its position, and combine them — which is exactly why the result differs from a plain average whenever the polygon's area isn't evenly spread relative to its vertices.
- Enter number of vertices.
- Enter vertex 1 — x.
- Enter vertex 1 — y.
- Enter vertex 2 — x.
- Enter vertex 2 — y.
- Enter vertex 3 — x.
- Enter vertex 3 — y.
- Enter vertex 4 — x.
- Enter vertex 4 — y.
- Enter vertex 5 — x.
- Enter vertex 5 — y.
- Enter vertex 6 — x.
- Enter vertex 6 — y.
- Enter vertex 7 — x.
- Enter vertex 7 — y.
- Enter vertex 8 — x.
- Enter vertex 8 — y.
- Enter vertex 9 — x.
- Enter vertex 9 — y.
- Enter vertex 10 — x.
- Enter vertex 10 — y.
- Click Calculate to see your results.
Examples
Unit square (0,0), (1,0), (1,1), (0,1)
Area = 1, and the centroid works out to (0.5, 0.5) — the exact center, as expected for a shape that's symmetric in every direction.
Right triangle (0,0), (4,0), (0,3)
Area = 6 (matching ½ × 4 × 3). The centroid formula gives (4/3, 1) ≈ (1.33, 1) — which, for a triangle specifically, happens to equal the simple average of its three vertices, (0+4+0)/3 and (0+0+3)/3. This vertex-average shortcut works only for triangles, not for polygons in general.
Trapezoid (0,0), (6,0), (4,3), (1,3)
Area = 13.5. The true area-weighted centroid comes out to approximately (2.78, 1.33) — noticeably different from the plain average of the four vertices, which would incorrectly give (2.75, 1.5). This gap is exactly why the area-weighted formula matters for anything beyond a triangle.
Common mistakes to avoid
- Entering vertices out of order around the polygon, which produces an incorrect, self-intersecting shape and a meaningless centroid.
- Assuming the centroid equals the average of the vertex coordinates for any polygon — that shortcut only holds exactly for triangles.
- Confusing the geometric centroid (area-weighted, assumes uniform density) with a mass-weighted center of mass, which can differ if density varies across the shape.
- Forgetting that a concave polygon can have a centroid that lies outside its own visible boundary.