Shoelace Formula Calculator - Polygon Area From Points

Accepts 3, 4 · 3 4 · (3, 4). Use a dot for decimals. Repeating the first point at the end is optional — it is detected and ignored. Up to 200 vertices.

Load an example

A five-sided plot measured in metres — 1,800 m² exactly.

Polygon from 5 vertices, drawn to scale

Dashed rectangle: the bounding box. The arrow on the first edge shows the direction of travel that sets the sign.

12345

Polygon area

1,800 m²

Signed area (½ · Σ)

1,800 m²

Winding direction

Counterclockwise (positive)

Perimeter

164.37 m

Vertices used

5

Centroid (x̄, ȳ)

24.24, 19.51

Shape

Convex

Bounding box

55 × 45 m

Fill of bounding box

72.7%

Same area in land units

0.18 hectares0.4448 acres

The lacing: every cross-multiplication term

Each row multiplies down-right (xi · yi+1) and up-right (xi+1 · yi), then subtracts. The last row wraps back to vertex 1.

Shoelace cross-multiplication terms for each edge of the polygon
i(xi, yi)xi · yi+1xi+1 · yiDifference
1(0, 0)000
2(40, 0)1,00001,000
3(55, 25)2,4756251,850
4(25, 45)7500750
5(0, 30)000
Column totals4,2256253,600

2A = 4,225625 = 3,600

A = |3,600| / 2 = 1,800

How each edge contributes

Every edge sweeps a triangle back to the origin. Green triangles add area, red ones subtract it, and what survives is the polygon.

Edge 12+0
Edge 23+500
Edge 34+925
Edge 45+375
Edge 51+0
Pick’s theorem check (integer coordinates)

Every vertex sits on the integer lattice, so the area has a second, completely independent derivation: A = I + B/2 − 1.

Boundary points B

90

Interior points I

1,756

I + B/2 − 1

1,800

B counts lattice points on the edges via gcd(|Δx|, |Δy|) per edge. Matching the shoelace answer confirms both.

Edge lengths and bearings
Bearing measured clockwise from north (0°), the convention used on survey plans.
EdgeLength (m)Bearing
124090°
2329.1530.96°
3436.06303.69°
4529.15239.04°
5130180°

How to Use This Calculator

  1. Paste your points into “Vertex coordinates”, one x, y pair per line, walking around the outline in order. Jumping between opposite corners is what produces a crossed shape and a wrong answer.
  2. Set “Coordinate unit” to whatever your points are in. Lengths come back in that unit, areas in its square, and metres, feet and yards also convert to acres and hectares automatically.
  3. Read the area from the big result, then confirm the plot matches the shape you expected. The numbered dots follow your input order and the arrow shows the direction of travel.
  4. Check the sign in “Signed area”: positive means counterclockwise, negative means clockwise. Hit “Reverse order” to flip it without retyping anything.
  5. Open “The lacing” table to see every cross-product term if you need to show your work, and expand “Pick’s theorem check” for an independent verification when your coordinates are whole numbers.

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

Shoelace Formula Calculator: How to Compute Polygon Area from Vertex Coordinates

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:
Shoelace Formula Calculator hero: a five-sided polygon on a coordinate grid with its vertices cross-connected in the diagonal lacing pattern

A shoelace formula calculator turns a bare list of corner coordinates into an exact area — five points, ten multiplications, one subtraction, and you are done. No trigonometry, no splitting the shape into triangles, no measuring anything on the ground. It works on a 300-vertex GIS boundary just as happily as on a homework quadrilateral, and it is exact for any polygon whose edges do not cross, convex or not. Below: the algorithm run on real numbers, the reason those cross products add up to an area in the first place, the three inputs that make it return a confident wrong answer, and the integer-lattice trick that lets you verify the result without repeating the arithmetic.

Running the Lacing on a Five-Corner Parcel

Take a plot with corners at (0, 0), (40, 0), (55, 25), (25, 45) and (0, 30), in metres, listed counterclockwise. Write the coordinates in a column, repeat the first pair at the bottom, then multiply diagonally — down-right for one column, up-right for the other. That criss-cross is where the name comes from; it looks like the lacing on a shoe.

The two product columns for the parcel. Every row uses the vertex on that row and the one below it.
Vertexxi · yi+1xi+1 · yiDifference
(0, 0)0 · 0 = 040 · 0 = 00
(40, 0)40 · 25 = 1,00055 · 0 = 01,000
(55, 25)55 · 45 = 2,47525 · 25 = 6251,850
(25, 45)25 · 30 = 7500 · 45 = 0750
(0, 30)0 · 0 = 00 · 30 = 00
Totals4,2256253,600

Halve the difference and the parcel is 1,800 m² — 0.18 hectares, or 0.4448 acres. Written compactly, that whole procedure is:

A = ½ · | Σ (xi · yi+1 − xi+1 · yi) |

with the index wrapping: vertex n+1 means vertex 1

Two details do most of the damage when people run this by hand. The wrap-around term is genuinely part of the sum — forget the last row and you get an open path, not a polygon. And the vertices must be in walking order around the boundary. A sorted-by-x spreadsheet column is not a polygon, it is a zigzag.

Why Cross-Multiplying Coordinates Produces an Area at All

Each term xiyi+1 − xi+1yi is the 2×2 determinant of the two vectors running from the origin to consecutive vertices. Geometrically it is twice the signed area of the triangle formed by the origin and that one edge. So the shoelace formula is nothing more exotic than fanning the whole polygon into triangles from the origin and adding them up — the same determinant that a cross product calculator returns as the z-component of u × v.

The clever part is what happens to the triangles that stick out. If the origin sits outside the polygon, several of those origin-triangles cover ground the polygon never touches. They still get counted — but with opposite signs, because the edges that create them are traversed in the opposite rotational direction. The overshoot cancels exactly. That is why you can put the origin anywhere, including a kilometre away, and still get the right answer: only the difference of the sweeps survives.

A worked demonstration makes it concrete. On the parcel above, the origin is a vertex, so two of the five terms are zero and the shape decomposes into three triangles of 500, 925 and 375 m². Slide the whole plot 1,000 m east and every individual term explodes into the millions — yet the differences still sum to 3,600. Area is translation invariant, and the algebra knows it. You can see the same cancellation live in the “How each edge contributes” bars in the calculator: on a non-convex shape some bars are red, and the red ones are the overshoot being subtracted back off.

The Minus Sign Is Information, Not a Mistake

Drop the absolute-value bars and the shoelace sum keeps a sign, and that sign tells you which way you walked. Counterclockwise gives a positive result, clockwise a negative one. Most textbooks bury this under the modulus and move on, which is a shame, because in code the sign is often the reason you called the function.

What the sign of the shoelace sum is actually used for in practice.
FieldConventionWhat a wrong sign causes
Computer graphicsCCW = front faceBack-face culling hides the polygon
GeoJSON / OGCCCW outer ring, CW holesHoles render as solid fill
CNC and CAMCCW = climb-mill outer profileCutter offsets to the wrong side of the line
Land surveyingCW traverse is traditionalNothing — the sign is dropped before reporting

A useful consequence: a polygon with holes needs no special handling. List the outer ring counterclockwise and each hole clockwise, run the shoelace sum over all of them, and the negative hole areas subtract themselves. That is how a doughnut-shaped parcel gets its net area in one pass.

Three Inputs That Return a Confident, Wrong Number

The shoelace formula has no way to complain. Feed it nonsense and it returns a clean number with no warning attached, which is exactly what makes it dangerous in a spreadsheet. These are the three failure modes worth recognising on sight.

How each failure looks, and what fixes it.
Bad inputSymptomFix
Points out of orderArea far too small; plot looks like a star or a zigzagRe-walk the boundary, or sort by angle about the centre
Edges that crossLobes cancel — a perfect bowtie reports exactly 0Split into simple polygons and sum the parts
First point repeated at the endUsually harmless, but breaks vertex counts and Pick’s theoremDrop the duplicate — the wrap is implied

The bowtie is worth trying yourself. Take the square (0,0), (4,4), (4,0), (0,4) — four perfectly good points, listed in an order that makes the edges cross in the middle. The shoelace sum returns 0. Not an error, not a NaN: zero, because the upper triangle is traced counterclockwise and the lower one clockwise, and 8 − 8 = 0. Any polygon whose edges cross gives you the difference of the lobes, and no amount of taking absolute values afterwards recovers the real enclosed area.

The out-of-order case is subtler and far more common, because it usually comes from a spreadsheet sorted by column. A rectangle’s corners sorted by x gives you a bowtie every single time. If you only have an unordered cloud of boundary points, sorting them by their angle around the centroid restores a valid loop for convex shapes — that is exactly what the “Sort points around the centre” button does. For genuinely concave outlines, there is no shortcut: you have to record the points in the order you walked them.

Integer Corners? Pick’s Theorem Checks Your Work for Free

When every vertex lands on a whole-number grid point, there is a second, completely independent way to get the area — and agreement between the two is about as close to a proof as a hand calculation gets. Pick’s theorem says:

A = I + B/2 − 1

I = interior lattice points, B = lattice points on the boundary

Try it on the L-shaped lot (0,0), (6,0), (6,3), (3,3), (3,6), (0,6). Shoelace gives 27. For Pick’s side, count boundary points edge by edge using gcd(|Δx|, |Δy|): the six edges contribute 6 + 3 + 3 + 3 + 3 + 6 = 24 boundary points. Counting the interior grid points gives 16. Then 16 + 24/2 − 1 = 16 + 12 − 1 = 27. Two entirely different countings, same answer.

Pick’s theorem is fussier than the shoelace formula: it needs integer coordinates and a non-self-intersecting outline, and it says nothing about a triangle with corners at (0, 0), (1, 0) and (0, 0.5). But when it does apply it is a genuine cross-check rather than a repeat of the same arithmetic, which is why it beats simply running the sum twice. There is a readable proof sketch and the lattice-counting details on Wikipedia’s Pick’s theorem page.

Surveyor’s Formula: Bearings In, Acres Out

Surveyors have used this since Gauss, which is why it is also called the surveyor’s formula or Gauss’s area formula. Field data does not arrive as coordinates, though — it arrives as a traverse of bearings and distances. Converting is two lines of trigonometry per leg:

departure (Δx) = distance · sin(bearing)

latitude  (Δy) = distance · cos(bearing)

xi+1 = xi + Δx  ·  yi+1 = yi + Δy

Run those around the traverse starting from (0, 0), and if the last leg does not land back on the origin you have a closure error to distribute before the area means anything. A traverse that misses by 0.3 m over a 400 m perimeter is a 1:1,333 closure — acceptable for a rural boundary, not for a city lot. Once it closes, the shoelace sum gives square metres or square feet, and the conversions are worth memorising: divide m² by 4,046.86 for acres, or ft² by 43,560. That second number is not arbitrary — an acre is 10 square chains, and a surveyor’s chain is 66 feet, so 10 × 66² = 43,560.

One trap catches programmers rather than surveyors: real-world coordinates are enormous. A UTM easting near 512,340 and a northing near 4,830,112 produce cross products around 2.5 × 10¹² for a lot covering 3,182.94 m². You are subtracting trillion-scale numbers to recover a thousand-scale answer, and the digits you need live at the very bottom of that subtraction. In 64-bit floating point the damage is modest — the raw sum lands on 3,182.9402, wrong in the eighth significant figure. Drop to 32-bit floats, still common in graphics pipelines and some GIS tooling, and the same four vertices return 131,072 m². Forty times too big, with no error raised.

The fix is one line: subtract the first vertex from every point before summing. Area is unaffected by translation, so the answer is identical in exact arithmetic but the numbers being multiplied shrink from 10¹² to 10³. That shifted sum returns 3,182.93994 even in single precision. This calculator does the shift internally on every input and flags it in the results panel whenever your coordinates cross six figures.

When a Shoelace Formula Calculator Is the Wrong Tool

A shoelace formula calculator wins whenever you already hold coordinates. It loses whenever you do not, and reaching for it anyway means inventing corner positions you never actually measured.

Choosing an area method by the data you actually hold.
You haveUseCost
n vertex coordinatesShoelace formula2n multiplications, exact
Three side lengths onlyHeron’s formulaOne square root; unstable on sliver triangles
Side count and one lengthRegular polygon formulasConstant time, but only for equal sides
A curved boundaryGreen’s theorem or a planimeterNeeds a parametrised curve or a physical trace
A scanned map imageDigitise the outline, then shoelaceAccuracy limited by your click precision

Heron’s formula deserves a specific warning here. On a long thin triangle — say sides 100, 100 and 0.02 — the classic s(s−a)(s−b)(s−c) form subtracts nearly equal numbers and can lose half its digits. The shoelace determinant on the same triangle has no such cancellation. If you can get coordinates, prefer them, and use a triangle area calculator for the side-length case only when coordinates genuinely are not available.

What Else Drops Out of the Same Cross Products

Once the term list exists, three more quantities are basically free. The centroid of the plate — not the average of the vertices, which is a different and usually wrong point — reuses each cross term weighted by the midpoint sums:

Cx = (1 / 6A) · Σ (xi + xi+1) · (xiyi+1 − xi+1yi)

Cy = (1 / 6A) · Σ (yi + yi+1) · (xiyi+1 − xi+1yi)

Note the signed A in the denominator, not the absolute value — the sign has to survive or a clockwise polygon returns a centroid mirrored through the origin. For the five-corner parcel this lands at (24.24, 19.51) m, which sits well inside the plot; on an L-shaped or crescent outline the centroid can fall outside the polygon entirely, and that is not a bug.

Convexity comes from the same determinant applied to consecutive triples: if every turn bends the same way, the polygon is convex, and a single sign flip marks a reflex corner. Perimeter needs only the distance formula applied edge by edge, and the edge midpoints — handy for labelling a plan — come straight from the midpoint formula. For the wider family of area methods across shapes that are not polygons at all, the general area calculator covers circles, ellipses and sectors, and the perimeter calculator handles their boundaries.

That is the real argument for learning this one properly rather than treating it as a formula to look up. One pass over the vertex list, one array of determinants, and you have the area, the winding direction, the centroid, the convexity and a ready-made check on all of it. There is a good technical write-up of the derivation and its variants on Wikipedia’s shoelace formula article if you want the full proof rather than the sketch above.

Frequently Asked Questions

Still Have Questions?

The detailed content on this page provides comprehensive explanations and examples to help you understand better.