calculator.onl
Categories50

Irregular area calculator: contours, holes and rectangle unions

A courtyard sits inside the outline. Does it count as floor?

A worked example

Net area in coordinate units 20 m² · Hole boundary length 8 m
Choose an ordered outer boundary with holes, or the union of axis-aligned measured rectangles.

All x/y coordinates and rectangle dimensions use this unit. The records are not automatically converted when you change it.

One x; y pair per line, with a blank line between contours. List the outside first, followed by holes. Follow each boundary in either direction; the final edge closes automatically. Repeating the first point once at the end is optional. Holes must be strictly inside and must not touch, overlap or contain another hole.

Updates as you type

Enter a finite value within the displayed range.

YOUR RESULT

Net area in coordinate units

20 m²

Calculated from your inputs

Square metres20 m²
Square feet215.2782 ft²
Hectares0.002 ha
Acres0.0049 ac
External boundary length20 m
Hole boundary length8 m
The numbers, at a glance

Calculations run in your browser.
UNDERSTAND THE RESULT

A little context. A clearer answer.

↑ Back to calculator

When this calculator is useful

Cut the inner square out once. The outside edges stay put and four square metres drop out. For a related calculation, try Cubic yard calculator for multiple shapes.

What to enter

InputWhat it meansExample value
Area methodChoose an ordered outer boundary with holes, or the union of axis-aligned measured rectangles.Contour with holes
Coordinate unitsAll x/y coordinates and rectangle dimensions use this unit. The records are not automatically converted when you change it.Metres
Contours · x; y, blank line between contoursOne x; y pair per line, with a blank line between contours. List the outside first, followed by holes. Follow each boundary in either direction; the final edge closes automatically. Repeating the first point once at the end is optional. Holes must be strictly inside and must not touch, overlap or contain another hole.0; 0 6; 0 6; 4 0; 4
Rectangles · x; y; width; heightOne x; y; width; height record per line. x/y identify the lower-left corner. Width and height must be positive. Overlaps count once, and common edges disappear from the perimeter.—

How the calculation works

  1. Validate every contour and its relationship to the holes, or divide the rectangle union into non-overlapping coordinate cells.
  2. Find each contour area by the shoelace formula and subtract the holes; for rectangles, sum each covered cell once.
  3. Sum external and hole boundary lengths separately, then convert the net area using the international foot: 1 ft = 0.3048 m.
The formulaA = |Σ(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ)|/2 − ΣAₕ; P = Σ√(Δx² + Δy²)

A worked example

Net area in coordinate units · 6 × 4 = 24 m² → 6 × 4 − 2 × 2 = 20 m²

Example you can load

What to enter
Result for this example · Net area in coordinate units24 m²

This is a fixed example; changing the form above does not change these numbers.

Assumptions & limits

Cartesian, straight-edged planar measurements only; no latitude/longitude, map projection, slope correction or land-survey certification. Coordinates use decimal dots, up to six decimal places and absolute magnitude at most 1000000. Polygon mode accepts 120 total vertices and 10 strictly separate holes. Every contour must be simple; touching contours are intentionally rejected. Rectangle mode accepts 40 axis-aligned rectangles, including overlaps and disconnected components. Changing coordinate units relabels the coordinate records; convert those text records yourself.

Frequently asked questions

Does vertex direction change the answer?

No. Clockwise and counterclockwise contours give the same unsigned area. The first contour identifies the outside, not its direction.

Can I enter only side lengths?

No. Side lengths alone do not determine a general polygon. Enter measured Cartesian coordinates, or place measured rectangles using corner coordinates.

How are overlapping rectangles and internal courtyards handled?

Overlapping cells count once. Boundary segments next to exterior empty space count as external perimeter; segments around enclosed empty cells count as hole perimeter.