Irregular Polygon Area Calculator
Paste any list of x,y corners and get the polygon's area by the shoelace formula, plus its perimeter, true centroid and vertex winding direction.
Irregular Polygon Area Calculator
Background.
The Quanta irregular polygon area calculator takes any list of corner coordinates and returns the enclosed area, the perimeter, the true centroid and the direction the corners were listed in. It does not care whether the shape is convex or concave, whether the sides are equal, or whether any angle is a right angle — it only needs the corners, in order, as you would walk around the boundary. Paste the default L-shaped hexagon and it returns an area of 33, a perimeter of 26, and a centroid at (2.5909090909, 2.9545454545).
The method is the shoelace formula, also known as the surveyor's area formula: multiply each corner's x by the next corner's y, subtract the reverse product, add the lot up, and halve it. The name comes from how the multiplications lace diagonally down two columns of coordinates. It has been the standard way to compute a parcel's area from a traverse for as long as surveying has been a profession, and it is exact — no approximation, no triangulation, no assumption about the shape being convex.
One thing this page refuses to do, and the refusal is the point. The shoelace formula is valid only for a simple polygon, one whose boundary does not cross itself. Feed a crossed outline into an ordinary shoelace calculator and it returns a perfectly plausible number in which the two lobes subtract instead of adding — the single most common way this calculation goes silently wrong. This calculator tests every pair of non-adjacent edges for a crossing before it computes anything, and if it finds one it says which two edges cross and refuses. A wrong number that looks right is worse than no number.
The centroid deserves a warning of its own, because it is where the second most common mistake lives. The centre of mass of a polygon is not the average of its corners. Averaging the six corners of the default hexagon gives (3, 3.6666666667); the real balance point is (2.5909090909, 2.9545454545), which is two fifths of a unit out in one direction and nearly three quarters of a unit out in the other. The difference exists because the corners tell you where the boundary is, not where the area is, and a shape with a wide base carries more of its area low down than a corner count reveals. This page uses the properly area-weighted formula. Averaging corners is correct for exactly one shape — a triangle — which is what the separate centroid calculator is for.
A few limits worth knowing before you trust the answer. The corners must be listed in boundary order, either direction; a scrambled list describes a different shape. Holes are not supported, so a shape with a void in it needs two runs and a subtraction. And this is plane geometry, not cartography: latitude and longitude pasted straight in will be treated as flat x and y, which is wrong at any appreciable scale — project to a metric grid first.
What is irregular polygon area calculator?
The shoelace formula computes the area of any simple polygon from the coordinates of its corners. Wolfram MathWorld gives it at Equation (4) of its Polygon Area entry: A = ½ Σᵢ₌₁ⁿ (xᵢyᵢ₊₁ − xᵢ₊₁yᵢ), where the indices wrap so that xₙ₊₁ = x₁ and yₙ₊₁ = y₁. Each term is a cross product measuring twice the signed area of the triangle formed by the origin and one edge; summing them around the loop cancels everything outside the polygon and leaves exactly twice its area.
The value that comes out is signed, and the sign is meaningful. MathWorld states the convention: the area "is defined to be positive if the points are arranged in a counterclockwise order and negative if they are in clockwise order". Surveying and GIS software rely on this to distinguish an outer boundary from a hole cut in it, which is why this page reports the sign separately rather than discarding it.
Two restrictions come with the formula, and MathWorld states one of them explicitly: it applies to "a planar non-self-intersecting polygon". A crossed outline breaks it, because the parts of the loop traced in opposite directions contribute opposite signs and partially cancel. The second restriction is that the corners must be given in boundary order — the formula has no way to know which corner is meant to follow which, so an out-of-order list simply describes a different polygon.
The centroid uses the same per-edge cross products, weighted differently. MathWorld's Geometric Centroid entry gives Equations (8) and (9): x̄ = 1/(6A) Σ (xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ), and the matching expression for ȳ. Because it divides by the signed area, reversing the corner order flips both the numerator and the denominator and leaves the answer unchanged.
The formula is old enough to have several names. Surveyors call it the surveyor's area formula or the double-meridian-distance method; mathematicians usually call it the shoelace formula or Gauss's area formula. Bart Braden's 1986 article in The College Mathematics Journal derives it from Green's theorem — the area of a region enclosed by a closed curve is ½ ∮ (x dy − y dx), which for a polygonal path collapses to exactly the sum above.
How to use this calculator.
- Write down the polygon's corners in order, walking around the boundary. Either direction works; the page tells you which one you used.
- Enter them one per line as "x, y". Spaces or semicolons work instead of commas, blank lines are ignored, and negatives and decimals are fine.
- If your list already repeats the first corner at the end — the way most GIS and CAD exports write a closed ring — leave it in. The page drops it rather than counting that corner twice, and the corner count confirms what it used.
- Read the area at the top. It is in the square of whatever unit your coordinates were in: metre coordinates give square metres, feet give square feet.
- Read the perimeter for a fencing, kerbing or trim estimate — it includes the closing edge from the last corner back to the first.
- Read the centroid if you need a balance point, a label position or a centre of mass. Do not substitute the average of the corners; the two are different for anything except a triangle.
- Check the winding direction if you are feeding the result into GIS or CAD, where anticlockwise usually means an outer ring and clockwise means a hole.
- If the page reports that the outline crosses itself, the corner order is wrong. It names the two edges that cross, which is usually enough to spot the pair that need swapping.
The formula.
Walk around the polygon one edge at a time. For the edge from corner i to corner i+1, form the cross product cᵢ = xᵢyᵢ₊₁ − xᵢ₊₁yᵢ. Geometrically that is twice the signed area of the triangle with vertices at the origin, corner i and corner i+1. Sum the cᵢ all the way round and every piece of area outside the polygon gets counted once positively and once negatively and cancels, leaving twice the polygon's own area. Halving gives the shoelace formula, A = ½ Σ cᵢ. The centroid reuses the same cᵢ with a position weight: x̄ = 1 ÷ (6A) × Σ (xᵢ + xᵢ₊₁)cᵢ, and likewise for ȳ.
Working the default all the way through, for the L-shaped hexagon (0, 0), (6, 0), (6, 4), (3, 4), (3, 7), (0, 7): the six cross products are 0, 24, 12, 9, 21 and 0, which sum to 66, so the signed area is 33 and the area is 33. The edge lengths are 6, 4, 3, 3, 3 and 7, so the perimeter is 26. For the centroid, Σ (xᵢ + xᵢ₊₁)cᵢ = 6×0 + 12×24 + 9×12 + 6×9 + 3×21 + 0×0 = 513, and 6A = 198, so x̄ = 513 ÷ 198 = 2.590909090909, displayed as 2.5909090909. Similarly Σ (yᵢ + yᵢ₊₁)cᵢ = 0×0 + 4×24 + 8×12 + 11×9 + 14×21 + 7×0 = 585, so ȳ = 585 ÷ 198 = 2.954545454545, displayed as 2.9545454545.
Every one of those numbers can be checked without the shoelace formula at all, because this particular shape cuts into two rectangles. The bottom one is 6 wide and 4 tall, so its area is 24 and its centroid is at (3, 2). The upper-left one is 3 by 3, sitting between y = 4 and y = 7, so its area is 9 and its centroid is at (1.5, 5.5). Adding the areas gives 24 + 9 = 33, matching. Weighting the centroids by area gives x̄ = (24 × 3 + 9 × 1.5) ÷ 33 = 85.5 ÷ 33 = 2.590909090909 and ȳ = (24 × 2 + 9 × 5.5) ÷ 33 = 97.5 ÷ 33 = 2.954545454545 — the same two numbers, from arithmetic that contains no cross products.
That same worked example shows why the corner average is not a centroid. The six x-coordinates average to (0 + 6 + 6 + 3 + 3 + 0) ÷ 6 = 3, and the six y-coordinates to (0 + 0 + 4 + 4 + 7 + 7) ÷ 6 = 3.6666666667. The real centre of mass is at (2.5909090909, 2.9545454545), which is 0.41 away in x and 0.71 away in y. The corner average knows only where the boundary points are; the area-weighted formula knows how much area sits where.
Rounding stage: every intermediate is carried at 40 significant digits and rounded once, at the return boundary, to 10 decimal places. The signed area is the pivot, and the centroid divides by the unrounded 6A — both 513 ÷ 198 and 585 ÷ 198 are recurring decimals, so rounding the area first would be visible in the ninth decimal place of the centroid. The winding classification also reads the unrounded signed area, and the test for a degenerate polygon is an exact comparison with zero rather than a tolerance, so a genuinely thin but real shape still computes while a set of corners on one straight line is rejected.
A worked example.
A landscaper is quoting for an L-shaped patio and has picked up six corners with a tape from one datum peg, in metres: (0, 0), (6, 0), (6, 4), (3, 4), (3, 7) and (0, 7). Pasting those six lines returns an area of 33 square metres, which is the paving order before wastage, and a perimeter of 26 metres, which is the edging. The corner count comes back as 6, confirming nothing was double-counted. The centroid lands at (2.5909090909, 2.9545454545) metres — the point to mark if a single central drain or a lighting bollard is going in — and the winding direction reads counter-clockwise, which is the orientation the site's mapping software expects for an outer boundary. The area is worth a hand check before ordering, and this shape makes it easy: the patio is a 6 by 4 rectangle plus a 3 by 3 square in the top-left corner, so 24 + 9 = 33 square metres, matching exactly. The centroid check takes one more line, weighting each rectangle's own centre by its area: (24 × 3 + 9 × 1.5) ÷ 33 = 2.590909 across and (24 × 2 + 9 × 5.5) ÷ 33 = 2.954545 up. Note what would have gone wrong with a quicker method — averaging the six corner coordinates gives (3, 3.6666666667), which is nearly three quarters of a metre too far up the patio, and a drain set there would sit in the narrow arm rather than the middle of the slab.
Frequently asked questions.
What is the shoelace formula?
Why does the calculator reject my polygon as self-intersecting?
Is the centroid the same as the average of the corners?
Does the order I enter the corners in matter?
What is the signed area for, and why is it negative sometimes?
Can I use latitude and longitude coordinates?
How do I handle a polygon with a hole in it?
References& sources.
- [1]Wolfram Research, MathWorld — ‘Polygon Area’ (live revision retrieved 2026-07-29). Equation (4), A = ½ Σᵢ₌₁ⁿ (xᵢyᵢ₊₁ − xᵢ₊₁yᵢ); the statement that the area ‘is defined to be positive if the points are arranged in a counterclockwise order and negative if they are in clockwise order’; and the restriction of the formula to ‘a planar non-self-intersecting polygon’, which is why this page rejects crossed outlines instead of measuring them. Open access.
- [2]Wolfram Research, MathWorld — ‘Geometric Centroid’ (live revision retrieved 2026-07-29). Equations (8) and (9), x̄ = 1/(6A) Σ (xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ) and the matching expression for ȳ, with xₙ₊₁ = x₁ and yₙ₊₁ = y₁. This is the area-weighted centre of mass reported here, and it is the reason the page does not simply average the corners. Open access.
- [3]Braden, Bart. ‘The Surveyor's Area Formula.’ The College Mathematics Journal 17, no. 4 (1986): 326–337, DOI 10.1080/07468342.1986.11972974. Peer-reviewed derivation of the same formula from Green's theorem, A = ½ ∮ (x dy − y dx) around a closed curve, under the name the surveying profession uses. Publisher-gated; the bibliographic record and abstract are open and the full text was not retrieved. Cited for the derivation's provenance and the alternate name, not for any number on this page — since it lands on the identical expression, agreement with it could not catch an arithmetic error. The checks that can, and that run in this page's test suite, are decompositions into rectangles and triangles.
- [4]Wolfram Research, MathWorld — ‘Trapezoid’ (live revision retrieved 2026-07-29). Equation (1), A = ½(a + b)h. One of the elementary shapes this page's results are decomposed against in testing, alongside rectangles, triangles and the regular hexagon's exact area 3√3/2. Open access.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 977 calculators remain free
- No billing is enabled