A± is the signed area; using it keeps the centroid right for either vertex order.
About polygon area from coordinates
List a polygon's corners in order around the outline and the shoelace formula gives its area: A = ½|Σ(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ)|, with the sum wrapping from the last vertex back to the first. The sign of the sum shows the direction of travel, positive for counterclockwise. The same terms give the centroid, and the edge lengths add up to the perimeter.
The default five points, (1, 6), (3, 1), (7, 2), (4, 4) and (8, 5), are the worked example in Wikipedia's article on the formula: the terms sum to 33, so the area is 16.5 m². Surveyors use the method, also called the surveyor's area formula, to find a plot's area from the corner coordinates on a site plan.
The outline must not cross itself. Up to 200 vertices, crossing edges trigger a warning because overlapping parts can cancel or count twice; for larger lists this check is skipped. Coordinates must be planar, so convert latitude and longitude to a projected grid such as UTM first.
How to find the area of a polygon from coordinates
List the corners in order around the outline, then apply the shoelace formula A = ½|Σ(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ)|, pairing the last corner with the first. For (0, 0), (4, 0), (0, 3), the terms are 0, 12 and 0, so A = 6. It works for any polygon whose edges do not cross.
Work the shoelace formula by hand
Write one term per edge, multiplying each x by the next y and subtracting the next x times this y. For the outline (1, 6), (3, 1), (7, 2), (4, 4), (8, 5):
(1, 6) to (3, 1): 1 × 1 − 3 × 6 = −17
(3, 1) to (7, 2): 3 × 2 − 7 × 1 = −1
(7, 2) to (4, 4): 7 × 4 − 4 × 2 = 20
(4, 4) to (8, 5): 4 × 5 − 8 × 4 = −12
(8, 5) back to (1, 6): 8 × 6 − 1 × 5 = 43
The terms sum to 33, so the area is 33/2 = 16.5 square units. The sum is positive because these corners run counterclockwise.
Clockwise or counterclockwise: the signed area
Without the absolute value, the sum's sign shows the direction of travel: positive for counterclockwise, negative for clockwise, on axes with y pointing up.
Listing the triangle as (0, 0), (0, 3), (4, 0) runs clockwise and gives −6, the same area of 6. Screen and image coordinates often have y increasing downward, which flips what looks clockwise.
Area and centroid examples
Outline
Vertices in boundary order
Area
Centroid
Rectangle
(0,0), (4,0), (4,3), (0,3)
12
(2, 1.5)
Right triangle
(0,0), (4,0), (0,3)
6
(4/3, 1)
L-shaped outline
(0,0), (6,0), (6,2), (2,2), (2,5), (0,5)
18
(7/3, 11/6)
Default five-point outline
(1,6), (3,1), (7,2), (4,4), (8,5)
16.5
(35/9, 11/3)
The L shape splits into a 6 × 2 rectangle and a 2 × 3 rectangle above its left end, 12 + 6 = 18. Its shoelace terms, 0, 12, 8, 6, 10 and 0, sum to 36, which halves to the same 18.
How to find the centroid of a polygon
Weight each shoelace term by the coordinates of its edge: Cx = Σ(xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ)/(6A), and Cy the same way with y, where A is the signed area. The L shape's centroid is (7/3, 11/6) ≈ (2.333, 1.833).
The plain average of the L's six corners is (8/3, 7/3), a different point. The corner average equals the centroid for a triangle, but not for polygons in general, and a concave shape's centroid can fall outside it.
Corners out of order. (0, 0), (4, 3), (4, 0), (0, 3) are the rectangle's corners, but in that order the outline crosses itself in a bow-tie and the sum is 0 instead of 24.
Dropping the closing term. Without the last-to-first term, 43 above, the five-point sum is −10 and the area comes out as 5 instead of 16.5.
Latitude and longitude as x and y. A degree of longitude shrinks toward the poles, so project map coordinates onto a flat grid, such as eastings and northings in meters, first.
Holes inside the outline. Work out the outer boundary and each hole separately, then subtract the holes.
Changing the unit label to convert. The unit names what the numbers already are: a 4 × 3 outline is 12 m² in meters or 12 ft² in feet, so convert the coordinates themselves.
Coordinate formats and limits
Formats: one x, y pair per line, or pairs such as (0,0); (4,0); (4,3); (0,3).
Closing point: repeating the first corner at the end is allowed and is dropped.
Size: 3 to 1,000 corners. Crossing edges are flagged for outlines of up to 200 corners; a crossed outline gives a net signed area, not the area it encloses.
Checked against: Area 16.5 from the Wikipedia “Shoelace formula” worked example
Rectangle 4 × 3
Vertices in order (x, y per line)
0, 0
4, 0
4, 3
0, 3
Coordinates are in
Metres (m)
Area
12 m²
Perimeter
14 m
Centroid x
2 m
Centroid y
1.5 m
Vertex order
Counterclockwise
Checked against: 4 × 3 rectangle; centroid at the centre
Right triangle, centroid at the mean of the vertices
Vertices in order (x, y per line)
(0, 0) (4, 0) (0, 3)
Coordinates are in
Metres (m)
Area
6 m²
Perimeter
12 m
Centroid x
1.33333333 m
Centroid y
1 m
Checked against: ½ × 4 × 3; 3-4-5 perimeter; a triangle's centroid is the vertex mean (4/3, 1)
Clockwise square (edge case: negative signed area)
Vertices in order (x, y per line)
0 0; 0 2; 2 2; 2 0
Coordinates are in
Metres (m)
Area
4 m²
Signed area
-4 m²
Vertex order
Clockwise
Checked against: Shoelace sum for clockwise order is −2 × area
Questions
How does the shoelace formula work?
Multiply each x by the next vertex's y, subtract the next x times this y, add the results all the way round and halve the absolute value. For (0, 0), (4, 0), (4, 3), (0, 3) the terms are 0, 12, 12 and 0, so the area is 24/2 = 12. The name comes from the criss-cross pattern the products make when the coordinates are written in two columns.
Does the order of the points matter?
Yes. The points must follow the boundary, clockwise or counterclockwise, without jumping across. Direction only flips the sign: counterclockwise gives a positive sum, clockwise a negative one, and the area is the absolute value. The corners of a 2 × 2 square taken as (0, 0), (2, 2), (2, 0), (0, 2) trace a crossed bow-tie whose shoelace area is 0 instead of 4.
How do you find the area of an irregular plot of land from its corners?
Record each corner as coordinates on a flat grid, such as eastings and northings in metres from a site plan, list them in order round the boundary and apply the shoelace formula. An L-shaped plot with corners (0, 0), (6, 0), (6, 2), (2, 2), (2, 5) and (0, 5) in feet covers 18 ft². Latitude and longitude must be projected first, because a degree of longitude shrinks towards the poles.
How do you find the centroid of a polygon?
Weight each shoelace term by the sum of the two x coordinates involved: Cx = Σ(xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ)/(6A), with A the signed area, and likewise for Cy. For a triangle this equals the average of the three vertices; for the L-shaped plot above it is (7/3, 11/6) ≈ (2.333, 1.833). The centroid of a non-convex shape can lie outside it.
This calculator includes 7 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.
Put this calculator on your site
Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.