Shoelace Formula Polygon Area Calculator
Free Shoelace formula polygon area Calculator for 2d geometry. Enter values to get step-by-step solutions with formulas and graphs.
Shoelace Formula Polygon Area Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: A = 0.5 x |sum(x_i * y_{i+1} - x_{i+1} * y_i)|
Worked example โ Area: 12.0000 sq units | Perimeter: 14.0000 units
Formula
A = 0.5 x |sum(x_i * y_{i+1} - x_{i+1} * y_i)|Where (x_i, y_i) are the coordinates of each vertex listed in order around the polygon. The formula sums cross products of consecutive vertex pairs, takes the absolute value, and divides by 2 to yield the area.
Worked Examples
Example 1: Rectangle Area Calculation
Problem:Calculate the area of a rectangle with vertices at (0,0), (4,0), (4,3), (0,3).
Solution:List the vertices in order and wrap back to the first: (0,0), (4,0), (4,3), (0,3), (0,0) Sum1 (down-right products, x_i * y_{i+1}) = (0)(0) + (4)(3) + (4)(3) + (0)(0) = 0 + 12 + 12 + 0 = 24 Sum2 (down-left products, y_i * x_{i+1}) = (0)(4) + (0)(4) + (3)(0) + (3)(0) = 0 + 0 + 0 + 0 = 0 Area = |Sum1 - Sum2| / 2 = |24 - 0| / 2 = 12 square units Check: the rectangle is 4 by 3, so 4 x 3 = 12 square units
Result:Area: 12.0000 sq units | Perimeter: 14.0000 units
Example 2: Irregular Pentagon Area
Problem:Find the area of a pentagon with vertices at (1,1), (4,1), (5,3), (3,5), (0,4).
Solution:Sum1 = (1)(1)+(4)(3)+(5)(5)+(3)(4)+(0)(1) = 1+12+25+12+0 = 50 Sum2 = (4)(1)+(5)(1)+(3)(3)+(0)(5)+(1)(4) = 4+5+9+0+4 = 22 Area = |50 - 22| / 2 = 28 / 2 = 14 square units
Result:Area: 14.0000 sq units | Perimeter: 14.3891 units
Frequently Asked Questions
What is the Shoelace formula and how does it work?
The Shoelace formula, also known as Gauss's area formula or the surveyor's formula, is an elegant mathematical method for calculating the area of any simple polygon when you know the coordinates of its vertices. The name comes from the crisscross pattern formed when you write out the calculation, which resembles lacing a shoe. The formula works by summing the cross products of consecutive vertex coordinates: you multiply each x-coordinate by the next y-coordinate, subtract the reverse products, take the absolute value, and divide by two. Mathematically it is expressed as A equals one half times the absolute value of the sum of x_i times y_(i+1) minus x_(i+1) times y_i for all vertices. It works for any non-self-intersecting polygon regardless of whether it is convex or concave.
Does the Shoelace formula work for concave or irregular polygons?
Yes, the Shoelace formula works perfectly for both convex and concave (non-convex) polygons, as long as the polygon is simple, meaning its edges do not cross each other. This makes it extremely versatile for real-world applications where shapes are rarely perfect rectangles or regular polygons. The formula handles irregular shapes with any number of sides, from triangles to complex polygons with hundreds of vertices. However, it does not work for self-intersecting polygons where edges cross over each other, creating a figure-eight or bowtie shape. For self-intersecting polygons, you would need to split the shape into non-intersecting parts and calculate each separately. The vertices must be listed in order around the polygon perimeter, either clockwise or counterclockwise.
How do I determine the correct vertex order for the formula?
Vertices must be listed in sequential order as you trace around the perimeter of the polygon, either consistently clockwise or counterclockwise. If vertices are listed out of order, the formula will produce an incorrect result because it would be calculating the area of a different polygon formed by connecting the points in your specified order. To verify your vertex order, you can plot the points on graph paper or use the signed version of the Shoelace formula, which gives a positive result for counterclockwise ordering and negative for clockwise. The absolute value ensures you get the correct area regardless of direction. In surveying and GIS applications, coordinates are typically recorded in the order they were measured walking around the property boundary.
What are practical applications of the Shoelace formula?
The Shoelace formula has numerous practical applications across many fields. In land surveying, it calculates property areas from GPS coordinates without needing to physically measure the entire boundary. Geographic Information Systems use it extensively for calculating areas of regions, parcels, and zones on maps. In computer graphics and game development, it determines the area of polygonal shapes for rendering, collision detection, and physics simulations. Architects and engineers use it for calculating floor areas of irregularly shaped rooms and buildings. Environmental scientists apply it to measure areas of lakes, forests, or habitats from satellite imagery coordinates. It is also fundamental in computational geometry algorithms for polygon triangulation, point-in-polygon testing, and mesh generation.
How accurate is the Shoelace formula compared to other area methods?
The Shoelace formula provides exact results for any simple polygon when given precise vertex coordinates, making it mathematically perfect with zero approximation error. This is a significant advantage over methods that approximate area by dividing shapes into simpler components or using numerical integration. The only source of error comes from the precision of the input coordinates themselves. When working with floating-point numbers, very large polygons with many vertices may accumulate small rounding errors, but these are typically negligible for practical purposes. For curved boundaries, the accuracy depends on how many straight-line segments you use to approximate the curve. More vertices along curved edges produce more accurate results. Compared to Monte Carlo or grid-based area estimation methods, the Shoelace formula is both faster and more precise.
Is the centroid reported here the same as the polygon's centre of area?
Not in general. Averaging the vertex coordinates gives the centroid of the vertices, which matches the centre of area only when the vertices are evenly spread, as in a regular polygon or a rectangle. The true area centroid weights each edge by the cross product term: Cx equals 1/(6A) times the sum of (x_i + x_(i+1)) times (x_i y_(i+1) minus x_(i+1) y_i), with Cy formed the same way using (y_i + y_(i+1)) and A the signed area. Use that version for balance points or moment calculations.
How is the Shoelace formula related to Green's theorem?
Green's theorem converts an area integral into a line integral around the boundary, giving A equal to one half of the closed contour integral of (x dy minus y dx). On a polygon the boundary is a chain of straight segments, and evaluating that integral along each segment reduces exactly to the term x_i y_(i+1) minus x_(i+1) y_i. The Shoelace formula is therefore the discrete case of Green's theorem, which is why it is exact rather than an approximation.
How does the formula relate to the cross-product area of a triangle?
Each term x_i y_(i+1) minus x_(i+1) y_i is the two-dimensional cross product of consecutive position vectors, equal to twice the signed area of the triangle formed by the origin and that edge. Summing over all edges makes the triangles outside the polygon cancel against those inside, leaving twice the polygon area. For a three-vertex input the sum collapses to the familiar triangle formula one half times the absolute value of x1(y2 minus y3) plus x2(y3 minus y1) plus x3(y1 minus y2).
Why does the area stay the same when I shift every coordinate by a constant?
Area is invariant under translation, and the cross-product terms are built from differences, so adding the same offset to every x and y leaves the total unchanged. It also stays the same under rotation. This matters numerically: survey coordinates in UTM or state-plane systems can run into the millions, and squaring or multiplying such values loses significant digits. Subtracting the first vertex from all the others before summing keeps the numbers small and preserves precision without changing the answer.
What does comparing the polygon area to its bounding-box area tell you?
The ratio of polygon area to the area of the axis-aligned bounding box is a fill ratio, a rough compactness measure. An axis-aligned rectangle fills its box completely at 100 percent, a triangle occupying half of its box gives 50 percent, and deeply concave or star-shaped outlines fall far lower. Because the box is axis-aligned, rotating an elongated shape lowers the ratio without changing its area, so read it as a shape descriptor and a sanity check on vertex entry, not as a property of the polygon alone.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎIrregular Polygon Area Calculator
Calculate irregular polygon area with inputs, formulas, and instant results.
๐งฎRegular Polygon Calculator
Calculate area, perimeter, interior angles, and apothem of any regular polygon.
๐งฎAnnulus Area Calculator
Calculate annulus area with inputs, formulas, and instant results.
๐งฎArea Calculator
Calculate area with inputs, formulas, and instant results.
๐งฎArea of a Rectangle Calculator
Calculate the area, perimeter, and diagonal of a rectangle. Find missing sides from known area. Convert between metric and imperial area units.
๐งฎArea of Crescent Calculator
Calculate area of crescent with inputs, formulas, and instant results.
๐งฎCross Sectional Area Calculator
Calculate cross sectional area with inputs, formulas, and instant results.
๐งฎPolygon Calculator
Calculate polygon with inputs, formulas, and instant results.