The shoelace formula calculates the area of any polygon given its vertices in order. For vertices (x₁,y₁), (x₂,y₂), ..., (xₙ,yₙ), the formula is: Area = 1/2 |Σ(xᵢyᵢ₊₁ - xᵢ₊₁yᵢ)|.
You multiply each x coordinate by the next y coordinate, subtract each y coordinate times the next x coordinate, sum everything, and take half the absolute value.
This works for any simple polygon (no self-intersections) and handles both convex and concave shapes.