ForHosting KIT · Math

Area of a quadrilateral

The rectangle with corners at (0, 0), (4, 0), (4, 3) and (0, 3) has an area of 12. Enter the four corners of any quadrilateral as coordinates, in order around the edge, and get the area without measuring heights or diagonals. Free in your browser.

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

This calculator finds the area of a quadrilateral from the Cartesian x and y coordinates of its four vertices using the classic shoelace formula, also called the surveyor's formula. You supply the corners in sequential boundary order—clockwise or counterclockwise—and the engine returns the enclosed area as a finite number. Surveyors checking a plot sketch, students working analytic-geometry homework, CAD and game pipelines, and scripts that already have four corner points all need this identity without opening a spreadsheet or measuring height and diagonals by hand.

What the shoelace formula computes for four vertices

The shoelace formula, also known as the surveyor's formula, computes the area of a simple polygon from an ordered list of vertex coordinates without needing side lengths, diagonals, or a measured height. For a quadrilateral the ring has exactly four corners (x1, y1) through (x4, y4). You walk around the boundary, multiply each x by the next y and each next x by the current y, subtract those products, sum the four contributions, take half of the absolute value, and that magnitude is the enclosed area.

Algebraically the identity is one half times the absolute value of the sum of (xi times yi+1 minus xi+1 times yi), with the fifth point defined as the first so the last edge closes the figure. Clockwise and counterclockwise listings produce opposite signed sums and the same positive area after the absolute value, so you do not have to remember which winding a CAD export used. A rectangle with corners at (0, 0), (4, 0), (4, 3), and (0, 3) yields area twelve; a unit square yields area one.

The same arithmetic covers rhombi, kites, trapezoids, and irregular convex or concave simple quads, because the formula never assumes right angles or equal sides. What it does assume is that the four points are listed in sequential boundary order. If you permute the vertices so opposite corners sit next to each other, the path can cross and the numeric result will not match the geometric region you had in mind.

List the corners as you would walk the fence: first, second, third, fourth, then the engine closes back to the start for you.

Decimal strings are allowed so a text field can submit without a client-side parse. Coordinates whose absolute value exceeds one trillion are rejected as out of published limits. More than four points is also rejected because this tool is a quadrilateral calculator, not a general polygon area service.

A valid vertex is one whose x and y both coerce to finite numbers; a hole, a null, or a non-numeric token does not count. On success the body includes area, the primary result rounded to twelve decimal places for stable goldens across runtimes; vertices, the four points echoed with the same rounding; and method, the string shoelace so clients can label the identity they used. Optional output fields that do not apply are omitted rather than sent as null.

Failed validation is not billed.

Where a four-vertex area calculator earns its keep

Classrooms and tutoring platforms use an area-of-a-quadrilateral calculator so learners can check a textbook figure whose corners are given as coordinates instead of as base and height. Surveying and architecture notebooks often already store four corner coordinates for a room, lot, or panel and only need the enclosed area before a full GIS stack is involved. Game and CAD pipelines extract quad faces from meshes or level editors and want the same shoelace number in a browser prototype and in a billed automation path.

Keep requests small, pin the rounded area in tests, and you get reproducible square units for homework, LMS plugins, and edge workers without standing up a geometry library of your own.

Homework and exam checks

Let students submit four ordered (x, y) corners and verify the shoelace area against textbook methods, including a hard fail when fewer than four valid vertices are given.

Plot, room, and panel take-offs

Turn four surveyed or drawn corners of a lot, room, or panel into a reproducible enclosed area without measuring diagonals or height by hand.

How is the area of a quadrilateral computed from vertices?

The engine applies the shoelace formula—one half the absolute value of the sum of (xi yi+1 − xi+1 yi)—and returns the area.

What happens if I send fewer than four vertices?

A quadrilateral needs four valid vertices with finite x and y; two or three points are not billed and are not treated as a zero-area success.

Do the four vertices have to be listed in order?

Yes. List them in sequential clockwise or counterclockwise boundary order, as you would walk the edges. An out-of-order list can cross itself and will not match the region you intended.

Does this work for trapezoids, kites, and irregular quads?

Yes. The shoelace identity never assumes right angles or equal sides. Rectangles, rhombi, trapezoids, kites, and irregular simple quadrilaterals are all valid four-vertex inputs.

Can I enter five or more points?

No. This calculator handles quadrilaterals only, so it needs exactly four corners. More than four points is rejected, and so are fewer than four or a corner with a missing coordinate.

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/area-quadrilateral

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/area-quadrilateral \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vertices":[{"x":0,"y":0},{"x":4,"y":0},{"x":4,"y":3},{"x":0,"y":3}]}'
{
  "vertices": [
    {
      "x": 0,
      "y": 0
    },
    {
      "x": 4,
      "y": 0
    },
    {
      "x": 4,
      "y": 3
    },
    {
      "x": 0,
      "y": 3
    }
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.area_quadrilateral",
  "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.

max_vertices4
max_abs_coord1000000000000
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 four valid vertices are given, or a coordinate is missing or not a finite number, the task fails with invalid_input instead of inventing a zero or a NaN. A successful API call costs $0.002; validation failures are not billed.

What the shoelace formula computes for four vertices

This capability exists to apply that identity to four vertices as a deterministic JSON contract: no Monte Carlo sampling of the interior, no raster fill, and no computer-algebra system.

Input contract, response shape, and error behaviour

POST a JSON body with the required array field vertices: four objects each carrying finite numbers x and y. Aliases points and coords are accepted for form and spreadsheet callers, and each item may arrive as a two-number array [x, y] instead of an object. Pair the response with your own drawing code if you need a sketch of the four edges; this endpoint returns the area and does not emit plots, SVG, or step-by-step schoolbook prose beyond the method field.

Where a four-vertex area calculator earns its keep

Exam-prep generators need a deterministic oracle that marks a three-point payload as invalid rather than silently returning zero, which a buggy grader might treat as a successful empty region. Whether you arrived searching for a quadrilateral area from vertices or for the shoelace formula on four points, the contract is the same: four valid corners in, a finite area out, or a clear invalid_input when the ring is too short.

Deterministic geometry fixtures

Seed unit tests and CI assertions with the shoelace area of a known quadrilateral so Worker and browser paths never disagree on the same four points.

What does the area of a quadrilateral calculator cost?

The browser tool is free. API requests use prepaid balance at $0.002 per successful call; invalid input, including fewer than four valid vertices, is not billed.

Read the full KIT documentation →