ForHosting KIT · Math

Irregular polygon area calculator

List the corners of a straight-sided shape in boundary order and get its area: the L-shaped outline (0, 0), (6, 0), (6, 2), (3, 5), (0, 2) encloses 21 square units. The ring closes itself and either direction works. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

Runs in your browser. Free, unlimited — your data never leaves this page.

This calculator computes the area of an irregular polygon from an ordered list of vertex coordinates using the classic shoelace formula, also known as the surveyor's formula. You supply the vertices as [x, y] pairs or {x, y} objects in boundary order, clockwise or counterclockwise; the engine closes the ring for you if the first point is not repeated at the end, and quietly drops the duplicate when you already closed it. The result is a single absolute area, expressed in the square of whatever unit your coordinates use, so meters give square meters and feet give square feet.

What the shoelace formula does and why vertex order matters

A simple polygon is a closed chain of straight edges that does not cross itself, and its area can be recovered from the sequence of vertex coordinates alone, without triangulating the interior, rasterizing it, or sampling random points. The shoelace formula multiplies each vertex's x coordinate by the next vertex's y coordinate, subtracts the cross products in the opposite direction, sums the signed contributions around the ring, halves the absolute value, and reports that as the area.

The name comes from the criss-cross pattern the multiplications trace when the coordinates are written in two columns, like lacing a shoe. Because the sum is signed, a clockwise ring yields the negative of a counterclockwise one; this tool takes the absolute value so both windings report the same positive area. The one thing the formula cannot forgive is disorder: the vertices must follow the boundary in sequence, either clockwise or counterclockwise.

A shuffled list of the same points describes a self-intersecting chain whose shoelace sum is not the area you intend, and the tool has no way to guess the intended order. If your points come from a scan or a GPS trace, sort or trace them along the boundary first.

Units, worked example, and when to use this tool

The shoelace formula is unit-agnostic: whatever unit your coordinates are expressed in, the returned area is in that unit squared. Coordinates in meters yield square meters, feet yield square feet, and unitless diagram coordinates yield square units. The tool never converts units for you; if your vertices mix meters and feet, convert first with a converter capability and then measure.

A worked example makes the mechanics concrete: take the L-shaped polygon with vertices [0, 0], [6, 0], [6, 2], [3, 5], [0, 2]. Pairing each vertex with the next, and the last back to the first, the forward products are 0, 12, 30, 6, and 0 for a total of 48, while the backward products are 0, 0, 6, 0, and 0 for a total of 6; the difference is 42 and half its absolute value is 21, so the area is exactly 21 square units.

Reach for this tool whenever you hold a boundary rather than a formula: land parcels sketched from a survey, rooms measured corner by corner, laser-scanned footprints reduced to polygons, game maps, and geometry homework all fit. Do not use it for self-intersecting figures such as a star traced as a single chain, because the shoelace sum then subtracts overlapping lobes by design; split the figure into simple parts and sum their areas instead.

For circles and circular arcs a polygon approximation converges quickly, but a dedicated circle or sector calculator is the exact tool.

What is an irregular polygon?

Any polygon whose sides and angles are not all equal. The shoelace formula handles regular and irregular simple polygons alike, as long as the boundary does not cross itself.

Do I need to repeat the first vertex at the end?

No. The ring is closed automatically. If you do repeat it, the duplicate is detected and dropped before the vertex count is checked.

Does vertex order matter?

Yes. Vertices must follow the boundary in sequence, clockwise or counterclockwise. Both windings give the same positive area, but a shuffled list does not describe your polygon.

What units is the area in?

The square of your coordinate unit: meters in, square meters out. The tool performs no unit conversion, so convert mixed inputs first.

How does the shoelace formula work?

Multiply each corner's x by the next corner's y, subtract the products taken the other way round, add everything around the shape and halve the result, ignoring its sign. The criss-cross pattern of those products is what gives the formula its name.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/math/irregular-polygon-area

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/math/irregular-polygon-area \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vertices":[[0,0],[6,0],[6,2],[3,5],[0,2]]}'
{
  "vertices": [
    [
      0,
      0
    ],
    [
      6,
      0
    ],
    [
      6,
      2
    ],
    [
      3,
      5
    ],
    [
      0,
      2
    ]
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.irregular_polygon_area",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

When fewer than three vertices remain after normalization, or any coordinate is missing or non-finite, the tool returns an invalid_input error instead of a silent zero or NaN. Through the API a successful request costs $0.002; validation failures are not charged.

What the shoelace formula does and why vertex order matters

Preferred input is the array field vertices; aliases points, polygon, and coords are accepted for form and spreadsheet callers. Each element may be a two-number array [x, y] or an object with x and y keys; lon, lng, longitude, lat, and latitude are also recognized for GIS-shaped payloads.

Input shape, ring closure, and error behavior

Many geometry formats close a polygon ring by repeating the first vertex at the end; if you supply such a list, the engine detects the trailing duplicate and drops it before counting, so a closed four-point rectangle passed as five entries is treated as four vertices. The opposite convention is equally fine: leaving the ring open is the expected default, and you should not add anything to close it. After that normalization the vertex count must be at least three. Errors are deterministic and are not charged: a failed request never consumes budget. The request body is a JSON object with one required field: vertices, an ordered array of at least three points. Points may be given as arrays like [3, 4] or as objects like {"x": 3, "y": 4}, and the two styles may not be mixed in a way that leaves any vertex without exactly two finite numbers. Two points describe a segment, not a polygon, and one point describes nothing measurable, so both raise an invalid_input error whose message states that an irregular polygon needs at least three vertices. The same error code covers a missing vertices field, a non-array payload, a vertex with a single coordinate, and non-finite values such as NaN or Infinity produced by earlier string-to-number conversion.

What happens if I pass fewer than three vertices?

The tool returns an invalid_input error stating that an irregular polygon needs at least three vertices. Validation failures are never charged.

How much does an API call cost?

A successful request costs $0.002. The same computation runs free in the browser widget, and failed validations are not billed.

Read the full KIT documentation →