
The shoelace formula, also known as Gauss's area formula and the surveyor's formula,
is a mathematical
algorithm
In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
to determine the
area
Area is the measure of a region's size on a surface. The area of a plane region or ''plane area'' refers to the area of a shape or planar lamina, while '' surface area'' refers to the area of an open surface or the boundary of a three-di ...
of a
simple polygon
In geometry, a simple polygon is a polygon that does not Intersection (Euclidean geometry), intersect itself and has no holes. That is, it is a Piecewise linear curve, piecewise-linear Jordan curve consisting of finitely many line segments. The ...
whose vertices are described by their
Cartesian coordinates
In geometry, a Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of real numbers called ''coordinates'', which are the signed distances to the point from two fixed perpendicular o ...
in the plane.
It is called the shoelace formula because of the constant cross-multiplying for the coordinates making up the polygon, like threading shoelaces.
It has applications in surveying and forestry,
[Hans Pretzsch, ]
Forest Dynamics, Growth and Yield: From Measurement to Model
', Springer, 2009, , p. 232. among other areas.
The formula was described by Albrecht Ludwig Friedrich Meister (1724–1788) in 1769 and is based on the trapezoid formula which was described by
Carl Friedrich Gauss
Johann Carl Friedrich Gauss (; ; ; 30 April 177723 February 1855) was a German mathematician, astronomer, geodesist, and physicist, who contributed to many fields in mathematics and science. He was director of the Göttingen Observatory and ...
and
C.G.J. Jacobi. The triangle form of the area formula can be considered to be a special case of
Green's theorem
In vector calculus, Green's theorem relates a line integral around a simple closed curve to a double integral over the plane region (surface in \R^2) bounded by . It is the two-dimensional special case of Stokes' theorem (surface in \R^3) ...
.
The area formula can also be applied to self-overlapping polygons since the meaning of area is still clear even though self-overlapping polygons are not generally
simple
Simple or SIMPLE may refer to:
*Simplicity, the state or quality of being simple
Arts and entertainment
* ''Simple'' (album), by Andy Yorke, 2008, and its title track
* "Simple" (Florida Georgia Line song), 2018
* "Simple", a song by John ...
. Furthermore, a self-overlapping polygon can have multiple "interpretations" but the Shoelace formula can be used to show that the polygon's area is the same regardless of the interpretation.
The polygon area formulas

''Given:'' A planar
simple polygon
In geometry, a simple polygon is a polygon that does not Intersection (Euclidean geometry), intersect itself and has no holes. That is, it is a Piecewise linear curve, piecewise-linear Jordan curve consisting of finitely many line segments. The ...
with a ''positively oriented'' (counter clock wise) sequence of points
in a
Cartesian coordinate system
In geometry, a Cartesian coordinate system (, ) in a plane (geometry), plane is a coordinate system that specifies each point (geometry), point uniquely by a pair of real numbers called ''coordinates'', which are the positive and negative number ...
.
For the simplicity of the formulas below it is convenient to set
.
''The formulas:''
The area of the given polygon can be expressed by a variety of formulas, which are connected by simple operations (see below):
If the polygon is ''negatively oriented'', then the result
of the formulas is negative. In any case
is the sought area of the polygon.
Trapezoid formula
The trapezoid formula sums up a sequence of oriented areas
of
trapezoid
In geometry, a trapezoid () in North American English, or trapezium () in British English, is a quadrilateral that has at least one pair of parallel sides.
The parallel sides are called the ''bases'' of the trapezoid. The other two sides are ...
s with
as one of its four edges (see below):
Triangle formula
The triangle formula sums up the oriented areas
of triangles
:
Shoelace formula

The triangle formula is the base of the popular ''shoelace formula'', which is a scheme that optimizes the calculation of the sum of the 2×2-Determinants by hand:
Sometimes this
determinant
In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
is
transpose
In linear algebra, the transpose of a Matrix (mathematics), matrix is an operator which flips a matrix over its diagonal;
that is, it switches the row and column indices of the matrix by producing another matrix, often denoted by (among other ...
d (written vertically, in two columns), as shown in the diagram.
Other formulas
Exterior Algebra
A particularly concise statement of the formula can be given in terms of the
exterior algebra
In mathematics, the exterior algebra or Grassmann algebra of a vector space V is an associative algebra that contains V, which has a product, called exterior product or wedge product and denoted with \wedge, such that v\wedge v=0 for every vector ...
. Let
be the consecutive vertices of the polygon. The Cartesian coordinate expansion of the outer product with respect to the standard ordered orthonormal plane basis
gives
and the oriented area is given as follows.
Note that the area is given as a multiple of the unit area
.
Example
For the area of the pentagon with
one gets
The advantage of the shoelace form: Only 6 columns have to be written for calculating the 5 determinants with 10 columns.
Deriving the formulas
Trapezoid formula

The edge
determines the trapezoid
with its oriented area
:
In case of