Shoelace Formula: Area of Any Polygon (Step-by-Step)

Shoelace Formula: Area of Any Polygon (Step-by-Step)

The shoelace formula is a simple, exact method for finding the area of any polygon when you know its corner coordinates. It works for triangles, quadrilaterals, pentagons, or any polygon with any number of sides — regular or irregular, convex or concave. This guide explains how it works, walks through the calculation step by step, shows where it comes from, and links to free calculators so you can check any result instantly.

What Is the Shoelace Formula?

The shoelace formula (also called the surveyor’s formula, Gauss’s area formula, or the cross-product method) computes the signed area of a simple polygon from its vertex coordinates. For a polygon with n vertices at positions (x₁, y₁), (x₂, y₂), …, (xₙ, yₙ), listed in order around the boundary:

Area = ½ |Σᵢ (xᵢ · yᵢ₊₁ − xᵢ₊₁ · yᵢ)|

where the indices wrap around so that xₙ₊₁ = x₁ and yₙ₊₁ = y₁. The vertical bars mean absolute value—you take the positive result regardless of whether the vertices were listed clockwise or counterclockwise.

The name “shoelace” comes from the visual pattern the calculation makes: if you write the x and y coordinates in two columns and draw lines between alternating pairs, the crossing lines look like the laces on a shoe.

The Shoelace Formula Step by Step

Here is the exact procedure for any polygon:

Step 1: List the vertex coordinates in order around the boundary—clockwise or counterclockwise; either works, but be consistent.

Step 2: Write out two columns: all the x-coordinates and all the y-coordinates, then repeat the first vertex at the bottom to close the loop.

Step 3: Multiply diagonally downward to the right (each x by the next y). Sum these products—call the total R.

Step 4: Multiply diagonally downward to the left (each y by the next x). Sum these products—call the total L.

Step 5: Area = ½ × |R − L|

This two-column multiplication pattern is the “shoelace”—R goes one way, L goes the other, and they cross like laces.

Worked Example: Irregular Pentagon

A five-sided plot has vertices (in meters): (0, 0), (6, 0), (7, 4), (3, 7), and (0, 4).

Set up the table (repeat first vertex at end):

xy
00
60
74
37
04
00

Right products (R): (0×0) + (6×4) + (7×7) + (3×4) + (0×0) = 0 + 24 + 49 + 12 + 0 = 85

Left products (L): (0×6) + (0×7) + (4×3) + (7×0) + (4×0) = 0 + 0 + 12 + 0 + 0 = 12

Area = ½ × |85 − 12| = ½ × 73 = 36.5 sq m ✔

Check this in our 5-Sided Shape Area Calculator—enter those five points and expand the step panel to see the same calculation.

Worked Example: Triangle

A triangle with vertices (0,0), (8,0), and (4,6):

R: (0 × 0) + (8 × 6) + (4 × 0) = 0 + 48 + 0 = 48 L: (0 × 8) + (0 × 4) + (6 × 0) = 0 + 0 + 0 = 0 Area = ½ × |48 − 0| = 24 sq units

Cross-check: base × height ÷ 2 = 8 × 6 ÷ 2 = 24 ✔ — same answer, two different methods.

Why It Works: The Geometric Idea

The Shoelace formula is built on a deeper idea: any polygon can be decomposed into signed triangles from the origin, each with area ½ × (xᵢ · yᵢ₊₁ − xᵢ₊₁ · yᵢ). Triangles on one side of the origin contribute positively; triangles on the other side contribute negatively. When you sum all the signed areas and take the absolute value, the negative pieces cancel the regions outside the polygon, and only the interior area remains.

This is why the formula works for concave polygons too — the signed cancellation handles inward-pointing corners automatically. And it is why the formula needs coordinates, not just side lengths: the sides alone don’t fix the shape, but the coordinates do.

Signed Area and Vertex Order

If you list vertices counterclockwise, the formula gives a positive result before the absolute value. Clockwise gives a negative result — hence “signed area.” In practice you always take the absolute value, so the order doesn’t matter for the final area. However, some applications (like checking whether a polygon is convex, or computing the winding number) use the signed version directly.

The Shoelace Formula vs. Other Methods

vs. Decomposition: Decomposition (splitting into rectangles and triangles) works well when the shape has right angles and known dimensions but gets complicated for shapes with slanted sides. The Shoelace formula handles both cases with the same arithmetic.

vs. grid/counting method: the grid method gives an approximation by counting squares. The shoelace formula gives an exact result.

vs. Integration: For shapes with curved boundaries, integration gives exact curved-area results. For straight-sided polygons, the Shoelace formula is simpler and just as exact.

Common Mistakes

Forgetting to close the loop: the last row in the table must repeat the first vertex. Without it, you miss the final edge’s contribution.

Mixing up R and L: R multiplies each x by the next y (down-right diagonal); L multiplies each y by the next x (down-left diagonal). Swapping them just changes the sign of the result — the absolute value still gives the right area, but it’s easy to lose track in a long calculation.

Out-of-order vertices: the formula assumes vertices are listed consecutively around the boundary. If you skip across the shape (P1 → P3 → P2, for instance), the formula computes the area of a self-crossing figure, not the shape you intended.

Using lengths instead of coordinates: the Shoelace formula needs (x, y) positions, not side lengths. Side lengths alone don’t determine a unique polygon—the same sides can form many shapes with different areas.

Where the Shoelace Formula Is Used

Land surveying: The Shoelace formula (under the name “surveyor’s formula”) has been used to compute land parcel areas from traverse surveys for over 200 years. Modern GIS software uses the same algorithm.

Computer graphics: polygon fill algorithms, hit-testing, and area calculations in graphics engines all rely on the Shoelace formula or a vector equivalent.

Computational geometry: the signed area version is used to determine polygon orientation, test point-in-polygon, and compute centroids.

Examination mathematics: In the UK (GCSE and A-Level) and US (SAT, ACT, and AP Calculus), the coordinate geometry of polygons is standard material, and the Shoelace formula is the efficient route to area questions involving irregular polygons on a coordinate grid.

Free Calculators That Use the Shoelace Formula

Every coordinate-based calculator on this site uses the Shoelace formula under the hood. Choose the one that matches your shape:

Frequently Asked Questions

Finding the exact area of any polygon from its vertex coordinates. It works for any simple (non-self-crossing) polygon—triangles, quadrilaterals, pentagons, and beyond—whether regular or irregular, convex or concave.

Because the cross-multiplication pattern — multiplying each x by the next y and each y by the next x — looks like the crossing pattern of shoelaces when drawn between the two columns of coordinates.

Yes. The signed-area cancellation handles inward corners automatically, so the formula gives the correct interior area for any simple polygon, concave or convex.

Both find polygon area from coordinates or measurements, but they work differently. Heron’s formula finds the area of a triangle from its three side lengths (not coordinates). The shoelace formula finds the area of any polygon from its vertex coordinates. For a triangle where you have coordinates, the Shoelace formula is usually simpler.

Not directly — it works in 2D. For a flat polygon in 3D space, you first project onto the polygon’s plane and then apply the cross-product version of the formula.

Similar Posts