Convex hull calculator
The convex hull of a set of points is the smallest convex polygon that encloses every point, the shape you would get by stretching a rubber band around a scatter of nails and letting it snap tight. It is one of the most fundamental constructions in computational geometry, used in collision detection, pattern recognition, geographic information systems and robot path planning. This calculator takes up to five points in the plane, each given by an x and a y coordinate, and treats them as the vertices of a convex polygon listed in order around the boundary. From those vertices it computes two quantities. The area is found with the shoelace formula, which sums the cross products of consecutive vertex coordinates and halves the absolute value. The perimeter is the sum of the straight-line distances between consecutive vertices, closing back to the first. Enter your own points, listed counterclockwise or clockwise around the hull, to measure a footprint, a coverage region or an exam problem. The results update as you type. Every figure here is computed deterministically from the standard shoelace and Euclidean distance formulas, shown in full below with a worked example that reconciles exactly to the calculator so you can follow each step.
The shoelace formula gives the polygon area A = half the absolute value of the sum of (x_i y_(i+1) minus x_(i+1) y_i). For the points (0,0), (4,0), (4,3), (2,5), (0,3), the convex hull area is 16.00 square units and its perimeter is 15.66 units.
Shoelace area and perimeter formulas
Area = (1/2) | sum_(i) ( x_i y_(i+1) - x_(i+1) y_i ) |
Perimeter = sum_(i) sqrt( (x_(i+1) - x_i)^2 + (y_(i+1) - y_i)^2 )
indices wrap around: vertex after the last is the first
points must be given in order around the convex boundary
The shoelace formula multiplies each x coordinate by the next y and subtracts the next x times the current y, sums the lot, takes the absolute value and halves it. The perimeter adds the Euclidean distance between each pair of neighboring vertices, including the closing edge back to the start.
Worked example
Take the five points (0,0), (4,0), (4,3), (2,5), (0,3) listed counterclockwise around the hull.
- Cross terms: (0x0-4x0) + (4x3-4x0) + (4x5-2x3) + (2x3-0x5) + (0x0-0x3)
- = 0 + 12 + (20 - 6) + 6 + 0 = 0 + 12 + 14 + 6 + 0 = 32
- Area = (1/2) x |32| = 16.00 square units
- Edge lengths: 4.00 + 3.00 + sqrt(8)=2.8284 + sqrt(8)=2.8284 + 3.00
- Perimeter = 4 + 3 + 2.8284 + 2.8284 + 3 = 15.66 units
The hull encloses 16.00 square units with a 15.66 unit perimeter across five vertices. These are the calculator's default inputs, so the results above match the widget exactly.
Convex hull calculator: frequently asked questions
What is a convex hull?
A convex hull is the smallest convex shape that contains a given set of points. Convex means the boundary never bends inward, so a straight line between any two interior points stays inside. For points in a plane the hull is a polygon whose corners are a subset of the original points; every other point lies on or inside it.
What is the shoelace formula?
The shoelace formula, also called the surveyor's formula, computes the area of any simple polygon from its vertex coordinates. You list the vertices in order, multiply each x by the next y, subtract each next x times the current y, sum these cross products, take the absolute value and halve it. The name comes from the crisscross pattern of the multiplications.
Do the points need to be in order?
Yes. This calculator treats the points you enter as the ordered vertices of the convex hull, going around the boundary either clockwise or counterclockwise. The shoelace formula relies on that ordering; a scrambled list would cross edges and give the wrong area. Enter the boundary points in sequence for a correct result.
How many points can I enter?
Up to five points. Leave a point field blank, or set it to a non-numeric value, to use fewer. Three points give a triangle, four a quadrilateral and five a pentagon. The area and perimeter are recomputed from whichever valid points you provide.
What are the units?
The coordinates are unitless, so the results are in the same length unit you used for the inputs. If your coordinates are in meters, the perimeter is in meters and the area is in square meters. The arithmetic is deterministic and the worked example reconciles exactly to the calculator.
Official sources
- Computational geometry and reference algorithm definitions: US National Institute of Standards and Technology (NIST). As at 25 June 2026.
Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.