Shoelace Formula Calculator
Area, signed orientation, perimeter and centroid of a polygon from its vertex list.
Shoelace Formula Calculator
Area, signed orientation, perimeter and centroid of a polygon from its vertex list.
What the page prints, and what it refuses
Every figure is printed with the rule or formula that produced it, and any numerical tolerance is stated on the result rather than implied. The page refuses an input the formula does not define and names the value it read; it prints no answer it cannot support.
The calculation runs entirely in this browser tab; nothing is uploaded.
The page applies the shoelace formula to a polygon's vertices. The rectangle (0,0), (4,0), (4,3), (0,3) has an area of 12, a perimeter of 14 and a centroid of (2, 1.5).
The signed area keeps the winding direction: positive for counter-clockwise and negative for clockwise. The page prints both, so a vertex list in the wrong order shows up as a sign rather than as a mysteriously wrong area.
What the shoelace sum measures
Summing xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ around the polygon gives twice the signed area. Each term is the signed area of the triangle from the origin to one edge, and the origin terms cancel around a closed loop.
The centroid uses the same cross products, weighted by (xᵢ + xᵢ₊₁) and (yᵢ + yᵢ₊₁). A repeated final vertex equal to the first is dropped, because closing the list twice would double the last edge.
How to use Shoelace Formula Calculator
Enter one vertex per line as x,y in order around the polygon, then press Run.
The result prints the area, the signed area and its direction, the perimeter, the centroid and the vertex count.
What to Expect
Best for
- Finding an irregular polygon's area
- Checking a winding order
- Getting a polygon's centroid
Not ideal for
- A self-intersecting polygon, where area has a different meaning
- A polygon with fewer than three distinct vertices
- A polygon with holes, which needs a different decomposition
What this tool keeps
- Every vertex and its order
What may need cleanup
- Nothing: the figures are final numbers
Common errors
- A malformed vertex line is refused with its line number
- Collinear vertices are refused as a zero area
Example use cases
- Area of a rectangle from vertices
- Check a plot of land
- Find a shape's centroid
Sample input
0,0 / 4,0 / 4,3 / 0,3
Sample output
area = 12, signed area = 12 counter-clockwise, perimeter = 14, centroid (2, 1.5)
Who this is for
- Geometry students
- Readers measuring a plot
Frequently asked questions
Does the vertex order matter?
It changes the sign of the signed area, not the absolute area. A self-intersecting order is a different figure, which is why the page shows the sign.
Should I repeat the first vertex at the end?
Either way. The page drops a final vertex identical to the first, so closing the list explicitly does not double-count the last edge.
What is the centroid here?
The area centroid, computed from the same cross products as the area. It is not the average of the vertices, which would be a different point.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.