Polygon Area Calculator – Shoelace Formula
The Polygon Area Calculator (Shoelace) computes the exact area of any simple polygon defined by a list of 2D Cartesian vertex coordinates. Unlike methods that only work for regular shapes, the Shoelace formula handles convex and concave (non-convex) polygons with any number of sides — from triangles all the way to complex land-boundary shapes with dozens of vertices.
What Is the Shoelace Formula?
Also known as the Gauss area formula or the surveyor's formula, the Shoelace formula calculates polygon area from ordered vertex coordinates alone — no heights, diagonals, or decomposition into triangles required.
Given n vertices (x₁, y₁), (x₂, y₂), …, (xₙ, yₙ) listed in order (either clockwise or counter-clockwise), with the last index wrapping back to the first:
Signed Area = (1/2) × Σᵢ (xᵢ · yᵢ₊₁ − xᵢ₊₁ · yᵢ)
Area = | Signed Area |
The name "Shoelace" comes from the visual pattern of the cross-multiplication — when written out, the index pairs cross like the laces on a shoe.
Signed Area and Winding Order
The formula returns a signed area. In standard Cartesian coordinates (y-axis pointing up), vertices listed counter-clockwise (CCW) produce a positive signed area, while clockwise (CW) ordering produces a negative value. The absolute area is the same either way. The calculator shows a CW / CCW badge so you can confirm the vertex order without mental arithmetic — useful in computer graphics (where CW may indicate a "back face") and in GIS workflows.
Additional Outputs
Beyond the area, this calculator provides several useful derived values:
- Perimeter — the sum of the Euclidean distances between each pair of consecutive vertices, including the closing edge from the last vertex back to the first.
- Centroid — the geometric center of the polygon weighted by area (not just the average of vertex positions). The centroid formula uses the same cross-products as the Shoelace:
Cx = (1/6A) Σ(xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ). - Bounding box — the minimum and maximum extents in the X and Y directions, giving the smallest axis-aligned rectangle that encloses the polygon.
Who Needs This Tool?
The Shoelace calculator is useful across many fields:
- Surveying and land measurement — convert GPS-derived boundary coordinates into an area in square meters, square feet, or any unit of your choice.
- Architecture and floor plans — calculate irregular room or plot areas that cannot be reduced to simple rectangles.
- GIS and mapping — find the area of geographic polygons defined by projected coordinate pairs.
- Computer graphics and game development — verify polygon areas and winding orders for rendering pipelines or physics simulations.
- Mathematics education — verify homework answers and explore how changing a single vertex shifts the area and centroid interactively.
Entering Vertices
You can add vertices one at a time using the row table, or paste a whole set at once using the Bulk Paste panel. The bulk parser accepts space-separated or comma-separated pairs, for example:
0 0, 4 0, 4 3, 0 3
The order of vertices matters: they must trace the polygon boundary continuously (either all clockwise or all counter-clockwise). Mixed or random order produces an incorrect, self-intersecting shape.
Units and Precision
The Shoelace formula is unit-agnostic — it works purely on the raw numbers you enter. If your coordinates are in metres, the area is in square metres (m²); if in feet, the result is in square feet (ft²). Use the unit label field to annotate the output for clarity. The precision control lets you choose between 0 and 10 decimal places in all displayed values.
Step-by-Step View
Expand the Step-by-Step Calculation panel to see a table of every Shoelace term — the individual cross-products xᵢyᵢ₊₁ − xᵢ₊₁yᵢ — their running total, and the final area. This breakdown is helpful for checking hand calculations, teaching the formula in class, or debugging unexpected results.
Accuracy and Limitations
All computations use JavaScript's 64-bit IEEE 754 floating-point arithmetic, giving about 15–16 significant decimal digits — far more than needed for any practical measurement task. One important limitation: the formula assumes the polygon is simple (edges do not cross). The calculator does not detect self-intersections; for a self-intersecting ("butterfly") shape, the result represents a net signed area rather than the true enclosed region.