Polygon Area from Coordinates Calculator (Shoelace Formula)
Area, perimeter and centroid of a flat shape with 3 to 6 corners from the X–Y coordinates of its corners, as used for plots of land and plans.
Results
Area
43.5000
Perimeter
25.4262
Centroid (centre of the area) — X
3.2874
Centroid (centre of the area) — Y
3.0230
Order in which the points were listed
Anticlockwise
What this tool does
The shoelace formula adds up xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ going once round the corners and halves the absolute value. It works for any simple polygon, convex or not, and needs no angles or diagonals — only the points, listed in the order you meet them walking round the edge, either direction. If the polygon crosses itself (a bow-tie) the formula still returns a number, but it no longer means the area. Coordinates must share one unit and one origin; surveyed points in metres give square metres.
Formula
S = Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ) · area = |S| ÷ 2 · Cₓ = Σ (xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ) ÷ 3S
Variables
| Symbol | Meaning | Unit |
|---|---|---|
n | Number of corners | — |
x1 | Point 1 — X | — |
y1 | Point 1 — Y | — |
x2 | Point 2 — X | — |
y2 | Point 2 — Y | — |
x3 | Point 3 — X | — |
y3 | Point 3 — Y | — |
x4 | Point 4 — X | — |
y4 | Point 4 — Y | — |
x5 | Point 5 — X | — |
y5 | Point 5 — Y | — |
x6 | Point 6 — X (if used) | — |
y6 | Point 6 — Y (if used) | — |
AR | Area | — |
PE | Perimeter | — |
CX | Centroid (centre of the area) — X | — |
CY | Centroid (centre of the area) — Y | — |
OR | Order in which the points were listed | — |
Worked example
- Number of corners5
- Point 1 — X0
- Point 1 — Y0
- Point 2 — X6
- Point 2 — Y0
- Point 3 — X8
- Point 3 — Y4
- Point 4 — X3
- Point 4 — Y7
- Point 5 — X-1
- Point 5 — Y4
- Point 6 — X (if used)0
- Point 6 — Y (if used)0
- Area43.5000
- Perimeter25.4262
- Centroid (centre of the area) — X3.2874
- Centroid (centre of the area) — Y3.0230
- Order in which the points were listedAnticlockwise
Limitations
- Mixing units is the most common source of error. Convert every input to the units shown next to each field before calculating.
- The calculation runs at full precision and only the display is rounded. If you copy an intermediate value and retype it, small differences can appear.