StatGardenREF. DESK
Calculators/Maths/Polygon area from vertices (shoelace formula)
Maths

Polygon area from vertices (shoelace formula) calculator

Area, perimeter and centroid of a simple polygon from its ordered vertices.

Published 8 August 2026 · Updated 23 September 2026

What this calculator does

The shoelace formula computes the area of any simple polygon from its vertices alone, no matter how irregular. The name comes from the criss-cross pattern of the multiplications when the coordinates are written out in two columns.

The sign of the result carries information. A positive signed area means the vertices were listed anticlockwise and a negative one means clockwise, which is why the absolute value is taken for the area itself.

The formula

FormulaSigned area = ½Σ(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ); centroid Cx,Cy = (1/6A)Σ(xᵢ+xᵢ₊₁)(xᵢyᵢ₊₁−xᵢ₊₁yᵢ), similarly for Cy

Each pair of consecutive vertices contributes a cross product term. Summing them and halving gives the signed area, and related sums give the centroid.

TermMeaning
Shoelace formulaThe cross-product sum that gives polygon area from vertices.
Signed areaThe result before taking the absolute value, whose sign gives orientation.
Simple polygonOne whose edges do not cross, which the formula requires.

The inputs explained

FieldWhat to enter
Vertices in order, x,y pairs separated by ; (e.g. 0,0; 6,0; 6,4; 0,4)Vertices in order around the polygon, as x,y pairs separated by semicolons. The order matters and the edges must not cross.

When to use it

Finding the area of an irregular plot

Survey coordinates go straight into the formula.

Computing a centroid

The same working yields the centre of area.

Checking vertex ordering

The orientation result confirms whether points were listed clockwise.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

Does the formula handle any shape?

A triangle, a rectangle and a square.

Three polygons
VerticesAreaCentroid
3 vertices: 0,0; 4,0; 4,36.000 (2.667, 1.000)
4 vertices: 0,0; 6,0; 6,4; 0,424.000 (3.000, 2.000)
4 vertices: 0,0; 5,0; 5,5; 0,525.000 (2.500, 2.500)
The right triangle with legs 4 and 3 gives an area of 6.000 and a centroid at (2.667, 1.000), which is the average of the three vertices. The 6 by 4 rectangle gives 24.000 with its centroid at the middle, (3.000, 2.000).

Questions

Why is it called the shoelace formula?

Because writing the coordinates in two columns and drawing lines between the terms being multiplied produces a criss-cross pattern like laced shoes. The name describes the bookkeeping rather than the mathematics.

Does the vertex order matter?

Very much. The vertices must go around the perimeter in sequence, either clockwise or anticlockwise. Listing them in a jumbled order describes a self-intersecting shape and gives a meaningless area.

What does the orientation tell me?

Whether the points were listed anticlockwise, giving a positive signed area, or clockwise, giving a negative one. It matters in computer graphics, where orientation determines which face of a polygon is visible.

Does it work for concave polygons?

Yes, provided the edges do not cross themselves. Concavity is no obstacle at all, which is one of the formula's real strengths over breaking a shape into triangles by hand.

For the incentre of a triangle, see the triangle incenter calculator. For triangle area from sides, see the triangle area calculator.