Centroid Calculator

Calculate the centroid of a triangle or polygon from vertex coordinates, with area, perimeter, interior angles, and polygon diagram.

V1
V2
V3
Centroid (x)
3.0000
X_c = 3.0000 — weighted by area contribution
Centroid (y)
1.6667
Y_c = 1.6667 — geometric center of area
Area
15.0000
Computed via the Shoelace formula: 15.0000 sq units
Perimeter
17.6619
Sum of all 3 side lengths: 17.6619
Bounding Box
6.00 × 5.00
From (0.00,0.00) to (6.00,5.00)
Convexity
Convex
All interior angles < 180°

Polygon Diagram

Vertices   Centroid

Vertices & Sides

VertexxySide lengthInterior angle
V10.0000.0006.000059.04°
V26.0000.0005.831059.04°
V33.0005.0005.831061.93°

Centroid Formulas

PropertyFormula
Area (Shoelace)A = ½|Σ(x_i·y_(i+1) − x_(i+1)·y_i)|
Centroid XC_x = (1/6A) Σ (x_i + x_(i+1))(x_i·y_(i+1) − x_(i+1)·y_i)
Centroid YC_y = (1/6A) Σ (y_i + y_(i+1))(x_i·y_(i+1) − x_(i+1)·y_i)
PerimeterP = Σ √((x_(i+1)−x_i)² + (y_(i+1)−y_i)²)
Planning notes, formulas, and examples

About the Centroid Calculator

The centroid of a polygon is its geometric center — the point at which a uniform lamina of that shape would balance perfectly. For simple polygons, the centroid coordinates are calculated using integral formulas simplified by the Shoelace method, which operates directly on vertex coordinates without requiring calculus.

For a triangle with vertices (x₁, y₁), (x₂, y₂), (x₃, y₃), the centroid is simply the average of the vertices: ((x₁+x₂+x₃)/3, (y₁+y₂+y₃)/3). For general polygons with more than three sides, the computation involves a weighted sum that accounts for the area contribution of each edge, using the same cross-product terms as the Shoelace area formula.

This calculator supports any simple polygon — from triangles to complex multi-sided shapes. Enter vertex coordinates in order and the tool computes the centroid, area, perimeter, all side lengths, interior angles, bounding box dimensions, and whether the polygon is convex or concave. The interactive polygon diagram plots vertices as dots and marks the centroid in red.

Presets include a right triangle, equilateral triangle, square, L-shape, and regular pentagon. You can add or remove vertices freely to model any planar shape. The formulas reference table summarizes the mathematical foundations.

Engineers, architects, and students use centroid calculations for structural load analysis, balance point determination, moment-of-inertia computations, and computational geometry algorithms.

When This Page Helps

Centroid calculations for polygons and irregular shapes require averaging vertex coordinates, and the signed-area (shoelace) formula for non-triangular polygons is notoriously easy to mis-index. This calculator handles triangles, rectangles, and arbitrary convex or concave polygons, computing the centroid from vertex coordinates. It also shows the signed area, verifies vertex winding order, and plots the shape with its centroid marked — giving engineers, architects, and students a visual sanity check that hand calculation cannot easily provide.

How to Use the Inputs

  1. Select a preset or enter vertex coordinates manually.
  2. Add more vertices with the "+ Add Vertex" button for complex shapes.
  3. Read the centroid coordinates from the output cards.
  4. Check area, perimeter, and convexity in the results.
  5. View the polygon diagram with the centroid marked in red.
  6. Use the vertices table for side lengths and interior angles.
Formula used
A = ½|Σ(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ)|; Cx = (1/6A)Σ(xᵢ+xᵢ₊₁)(xᵢyᵢ₊₁−xᵢ₊₁yᵢ); Cy = (1/6A)Σ(yᵢ+yᵢ₊₁)(xᵢyᵢ₊₁−xᵢ₊₁yᵢ)

Example Calculation

Result: Centroid = (3.00, 1.67), Area = 15

A triangle with vertices at (0,0), (6,0), (3,5) has its centroid at the average: (9/3, 5/3) = (3.00, 1.67) and area = ½|6×5| = 15.

Tips & Best Practices

  • For triangles, the centroid is always at the intersection of the medians.
  • Enter vertices in order (clockwise or counterclockwise) for correct results.
  • The centroid of a convex polygon always lies inside the polygon.
  • For concave polygons, the centroid may be outside the shape.
  • Use the bounding box to understand the polygon's extent.

Centroid Formulas by Shape

For a triangle with vertices (x₁,y₁), (x₂,y₂), (x₃,y₃), the centroid is simply the arithmetic mean: ((x₁+x₂+x₃)/3, (y₁+y₂+y₃)/3). For a general polygon with n vertices, the centroid uses the first moment of area divided by the signed area A = ½|Σ(xᵢ yᵢ₊₁ − xᵢ₊₁ yᵢ)|, with centroid coordinates weighted by the cross products of consecutive vertices. Rectangles and other symmetric shapes have their centroid at the intersection of lines of symmetry, but irregular polygons require the full shoelace-based computation. Getting the vertex winding order (clockwise vs. counterclockwise) right is essential — a sign error flips the area and shifts the centroid.

Centroids in Structural Engineering

In structural analysis, the centroid of a beam's cross-section is the neutral axis — the line where bending stress is zero. Axial loads applied through the centroid produce pure compression or tension with no bending moment. When the load is eccentric (off-centroid), the resulting bending moment M = P·e creates stress variations across the section. Engineers design columns and beams by first finding the centroid, then computing the second moment of area (moment of inertia) about centroidal axes. Composite sections (e.g., steel I-beam with a concrete slab) use the parallel axis theorem, which requires knowing each sub-section's centroid.

Centroid vs. Center of Mass vs. Center of Gravity

These three concepts coincide for a uniform-density body in a uniform gravitational field, but they differ in general. The centroid is a purely geometric property of a shape (area or volume). The center of mass accounts for varying density. The center of gravity accounts for a non-uniform gravitational field (important for very large bodies like moons). For most engineering applications the three are identical, but in aerospace and geophysics the distinctions matter. This calculator computes the geometric centroid; for variable-density bodies, use the center of mass calculator instead.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • The centroid is the geometric center of a shape — the average position of all points in the area. A uniform flat shape balances at its centroid.