Polygon Coordinates Calculator
Results
Formulas Used in Polygon Coordinates Calculator
In-Depth Tutorial: Polygon Coordinates Calculator
The Polygon Coordinates Calculator uses the Shoelace formula (also called the surveyor's formula or Gauss's area formula) to find the area of any simple polygon — regular or irregular — from its (x, y) vertex coordinates alone. No side lengths, no angles, no height measurements needed. Just plug in the vertices in order. This tutorial explains the formula, why it works (in geometric terms), and walks through worked examples for both convex and concave polygons.
The Shoelace formula
For a polygon with n vertices listed in order as (x₁, y₁), (x₂, y₂), ..., (xₙ, yₙ):
Area = ½ × |Σ (xᵢ × yᵢ₊₁ − xᵢ₊₁ × yᵢ)|
The sum runs over all consecutive vertex pairs, treating (xₙ₊₁, yₙ₊₁) as the same as (x₁, y₁) (wrap around). The absolute value bars handle the case where vertices are listed clockwise (which gives negative under the sum); the result is always a positive area.
The "Shoelace" name
The formula gets its name from the way you compute it visually:
- Write all the x-coordinates in one column, y-coordinates in another, REPEATING the first row at the bottom (to close the polygon).
- Multiply down-and-right (each xᵢ times the y_{i+1}). Sum these.
- Multiply down-and-LEFT (each yᵢ times the x_{i+1}). Sum these.
- Take the absolute difference of the two sums, divide by 2.
The diagonal multiplication pattern looks like a shoelace zigzag — hence the name.
Worked example 1 — square via Shoelace
Square with vertices (0, 0), (4, 0), (4, 3), (0, 3) — actually a 4 × 3 rectangle.
Compute the down-right products and down-left products:
Down-right: (0×0) + (4×3) + (4×3) + (0×0) = 0 + 12 + 12 + 0 = 24
Wait, let me redo this with the correct pairing. The formula is Σ(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ).
- (x₁y₂ − x₂y₁) = (0×0) − (4×0) = 0
- (x₂y₃ − x₃y₂) = (4×3) − (4×0) = 12
- (x₃y₄ − x₄y₃) = (4×3) − (0×3) = 12
- (x₄y₁ − x₁y₄) = (0×0) − (0×3) = 0
Sum = 0 + 12 + 12 + 0 = 24. Area = |24| / 2 = 12.
Verification: A 4 × 3 rectangle has area 12. ✓
Worked example 2 — triangle
Triangle with vertices (0, 0), (6, 0), (3, 4).
- (0×0 − 6×0) = 0
- (6×4 − 3×0) = 24
- (3×0 − 0×4) = 0
Sum = 24. Area = 24 / 2 = 12.
Verification: triangle base 6, height 4, area = ½ × 6 × 4 = 12. ✓
Worked example 3 — irregular pentagon
Pentagon with vertices (0, 0), (5, 0), (6, 3), (3, 5), (−1, 3).
- (0×0 − 5×0) = 0
- (5×3 − 6×0) = 15
- (6×5 − 3×3) = 21
- (3×3 − (−1)×5) = 9 + 5 = 14
- ((−1)×0 − 0×3) = 0
Sum = 50. Area = 50 / 2 = 25.
Notice: no need to compute side lengths or break the pentagon into triangles. Just the vertex coordinates.
Why does Shoelace work?
Intuition: the Shoelace formula computes the signed area swept out by going around the polygon. Each term (xᵢyᵢ₊₁ − xᵢ₊₁yᵢ) is twice the signed area of the triangle formed by the origin, vertex i, and vertex i+1. Summing all these gives twice the polygon area. Divide by 2 to recover the area itself.
The absolute value handles the case where vertices are listed clockwise (giving a negative result) versus counter-clockwise (positive). Both orderings give the same absolute area.
Counter-clockwise vs clockwise
Listing the vertices counter-clockwise gives a POSITIVE sum. Clockwise gives a NEGATIVE sum.
This is intentional — it lets the formula detect orientation. In some contexts (computational geometry, polygon winding), the sign tells you which "side" of the polygon you're tracing. For pure area calculation, just take the absolute value.
Important: vertices must be in order
The Shoelace formula requires vertices listed in order around the polygon boundary — either consistently clockwise or consistently counter-clockwise. Listing them out of order (jumping around) creates a self-intersecting "polygon" that doesn't exist physically, and the formula returns a different (smaller) area.
Concave polygons
Shoelace works for concave (non-convex) polygons too — as long as the polygon is simple (doesn't self-intersect). Just list the vertices in their natural boundary order.
Self-intersecting polygons
For polygons with crossing edges (like a star drawn with a single continuous line, or a "bowtie"), Shoelace returns a value that depends on the crossings — typically the "net" signed area where some regions count positive and others negative. For most practical purposes, this isn't the result you want; ensure your polygon is simple before using Shoelace.
Real-world applications
- Surveying. Computing land area from corner GPS coordinates. The Shoelace formula is exactly how property surveyors calculate plot areas.
- GIS / Mapping. Computing the area of a region defined by latitude-longitude polygon vertices (with a flat-Earth approximation for small regions).
- Computer graphics. Computing polygon areas for collision detection, rendering, or geometric algorithms.
- Architecture and design. Computing irregular floor plan areas from CAD coordinates.
- Mathematics — Pick's theorem. Counts the lattice points inside a polygon with integer vertices, related to the Shoelace area.
Common mistakes
- Forgetting to close the polygon. The last vertex must connect back to the first. Either include (xₙ₊₁, yₙ₊₁) = (x₁, y₁) explicitly or treat the wraparound implicitly.
- Listing vertices out of order. Random ordering creates a self-intersecting shape with wrong area. Always trace the boundary in order.
- Forgetting the ½. The Shoelace sum is TWICE the polygon area. Divide by 2 at the end.
- Forgetting the absolute value. The result can be negative (clockwise listing). Areas are always positive — take |result|.
- Using on self-intersecting polygons. Shoelace gives "signed area" for self-intersecting figures; this is not the same as physical area.
Frequently Asked Questions – Polygon Coordinates Calculator
Enter one vertex per line as x,y — for example: 0,0 on the first line, 4,0 on the second, and so on. List vertices in sequential order around the polygon.
The Shoelace formula: Area = ½ |Σ(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ)|. It works for any simple (non-self-intersecting) polygon with any number of vertices.
Yes — list them consecutively (all clockwise or all counter-clockwise). A random order may create a self-intersecting shape with an incorrect area.
Yes — free and unlimited.
Pick's theorem — polygons with integer vertices have a surprising area shortcut
When the polygon's vertices happen to sit exactly on integer lattice points (both x and y coordinates are integers), Pick's theorem gives the area from a simple count of lattice points:
Area = I + B/2 − 1
Where I is the number of lattice points strictly inside the polygon, and B is the number of lattice points on the boundary (including vertices and any lattice points that happen to lie on edges). Georg Pick proved this in 1899, and the elegance is striking: no side lengths, no coordinate arithmetic — just count dots.
Concrete example: a triangle with vertices at (0, 0), (4, 0), (0, 3). Boundary lattice points: the three vertices, plus (1,0), (2,0), (3,0) along the bottom (4 more), plus (0,1), (0,2) along the left (2 more), plus the hypotenuse from (4,0) to (0,3) — check if any integer points lie on it besides the endpoints. The hypotenuse has slope -3/4; integer solutions to 3x + 4y = 12 in the strict interior are none. So B = 3 + 3 + 2 + 0 = 8. Interior lattice points: count directly, I = 3 (namely (1,1), (2,1), (1,2)). Pick's formula: Area = 3 + 8/2 − 1 = 6. Shoelace or the standard triangle formula confirms: (1/2)(4)(3) = 6. Both give the same answer.
Pick's theorem doesn't generalize to 3D — Ehrhart theory (which extends the same lattice-count idea) shows that 3D polytopes have a much richer combinatorial structure than a single formula. But in 2D, it's the standard "cheat" for computing areas of graph-paper polygons in problems where counting dots is easier than computing coordinates. Some computational-geometry algorithms use Pick's theorem as a sanity check against Shoelace-computed areas for lattice polygons.
The Shoelace formula is a discrete version of Green's theorem
The Shoelace formula looks like ad-hoc coordinate manipulation, but it's actually a discrete case of one of the most important theorems in vector calculus: Green's theorem. Green's theorem states that the area enclosed by a closed curve C can be computed as the line integral around the curve:
Area = (1/2) ∮_C (x dy − y dx)
When the curve is smooth (like a circle or ellipse), you compute the integral using calculus. When the curve is a polygon — piecewise linear — the integral simplifies. Each edge of the polygon contributes a term of the form (1/2)(x_i · y_{i+1} − x_{i+1} · y_i), which is exactly the Shoelace formula's summand. The wraparound over all edges of the polygon gives the total area.
This connection matters for two reasons. First, it explains why Shoelace works for arbitrary simple polygons: it's a special case of a theorem that already handles any closed curve, so polygons come for free. Second, it makes the polygon area computation a stepping stone to more advanced techniques. The same Green's-theorem framework computes the centroid of a polygon (Cx = (1/(6A))∑(x_i + x_{i+1})(x_i y_{i+1} − x_{i+1} y_i)), the second moment of area used in mechanical engineering (for bending stiffness of beam cross-sections), and various other physical quantities. Every one of these uses the same "sum around the boundary" pattern the Shoelace formula introduced.
Line-integral computation of area also generalizes to fractal-like curves where the boundary isn't smooth — a broad theoretical setting used in physics and image processing. The Shoelace formula's polygon case is the friendliest entry point to this whole class of "boundary determines interior" results in vector calculus.
Practical questions the tutorial doesn't cover
How do I compute the centroid of a polygon from its coordinates?
Two formulas, both derived from Green's theorem:
C_x = (1/(6·A)) · Σ (x_i + x_{i+1}) · (x_i · y_{i+1} − x_{i+1} · y_i)
C_y = (1/(6·A)) · Σ (y_i + y_{i+1}) · (x_i · y_{i+1} − x_{i+1} · y_i)
Where A is the signed area from Shoelace (positive if CCW). The centroid is the geometric center of the polygon's area, not the average of its vertices — those two are different for irregular polygons. The average of vertices gives the "vertex centroid," which is where you'd balance the polygon's outline if you cared only about the corners; the area centroid is where you'd balance a solid cutout of the polygon. For a symmetric polygon (rectangle, regular hexagon), both give the same point. For an L-shape or other irregular polygon, they differ significantly.
Does this work for polygons in 3D space?
The Shoelace formula as written is 2D-specific — it assumes the polygon lies in the xy-plane. For a polygon in 3D space (vertices with x, y, z coordinates), the polygon still has a well-defined area, but you need a different formula: use the 3D cross product. Compute vectors v_i = P_i − P_1 from the first vertex, then Area = (1/2) · |Σ (v_i × v_{i+1})| where the cross product is the 3D vector cross product. The result's magnitude is the polygon's area regardless of its orientation in 3D. Computer graphics engines compute mesh face areas this way — a polygonal mesh face in 3D uses cross-product accumulation, not the flat-plane Shoelace formula.
What if my coordinates have very large magnitudes (like millions)?
The Shoelace formula involves subtracting nearby similar products like x_i · y_{i+1} − x_{i+1} · y_i. When the coordinates are large (say, both terms are around 10^12), the difference can suffer from catastrophic cancellation in floating-point arithmetic — the significant digits of the difference are lost. For GPS-derived coordinates (typically 10^7 or so in UTM meters), this is usually fine. For huge coordinate systems (say, astronomy in meters), it can be problematic. The fix: translate all coordinates so they're relative to the first vertex (subtract (x_1, y_1) from every point). This puts everything close to the origin, avoiding the cancellation issue while giving the same final area. This "coordinate translation before Shoelace" is standard practice in geospatial software libraries.
Can I use this to verify a polygon's convexity?
Yes, indirectly. Compute the signed area of each triangular contribution (x_i · y_{i+1} − x_{i+1} · y_i) individually rather than just summing them. If all the individual signs are the same (all positive or all negative), the polygon is convex — the boundary always turns in the same direction. If some signs are positive and others negative, the polygon is concave. This is the "cross-product convexity check" widely used in computational geometry: computing the sign of each consecutive-edges cross product tells you whether that vertex is convex or concave. Extending across all vertices decides the whole polygon's convexity. Some algorithms use this to quickly reject non-convex polygons from operations that require convexity (like some rendering optimizations or physics collision routines).