Polygon area from coordinates

Area, perimeter and centroid of a simple polygon from ordered vertices.

Inputs

Polygon area from coordinates calculator

1 field

One vertex per line: x and y separated by whitespace or ;. Use one length unit for coordinates; area uses its square. At most 256 vertices.

A simple planar outline in Cartesian coordinates. Centroid refers to a uniformly filled region, not the average of vertices or a non-uniform material. Geographic latitude and longitude are not planar lengths.

Fill in the fields and the result will appear here automatically.

The shoelace formula gives the area of a simple polygon from vertices entered along its outline. Either clockwise or anticlockwise order is valid: direction changes the signed sum but not geometric area. The calculator also gives perimeter and the centroid of a uniform planar region. Concave outlines are allowed; self-crossings, overlapping edges and zero area are excluded.

FAQ
5 questions
Freshness
formula-based

How it works

Formula and logic

Let wᵢ = xᵢyᵢ₊₁ − xᵢ₊₁yᵢ and 2A_signed = Σwᵢ; area is |A_signed|. Centroid X = Σ(xᵢ+xᵢ₊₁)wᵢ/(6A_signed), with Y analogous. Perimeter sums neighbouring-vertex distances, including the closing edge. Coordinate products and signs are evaluated before rounding so a large origin shift does not destroy a small area.

Example

A 4 by 3 rectangle entered as four corners gives an area of 12 and a perimeter of 14.

Fields and units

  • Vertices: x and y per line, in order — common coordinate length unit

How to use

  • — Enter one vertex per line: x and y.
  • — Follow the outline in order — either direction works, but do not jump across.
  • — Do not repeat the first vertex at the end; the outline closes itself.
  • — Check the winding if the shape is not what you expected.
  • — Separate x and y with whitespace or a semicolon; a decimal comma is allowed inside a coordinate. Page limits are 3–256 distinct vertices and 32768 characters.

Method and limitations

Calculation method
Formula and logic
Limitation
A simple planar outline in Cartesian coordinates. Centroid refers to a uniformly filled region, not the average of vertices or a non-uniform material. Geographic latitude and longitude are not planar lengths.

FAQ

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

No: the outline closes automatically. One repeated first point at the very end is accepted and excluded from the vertex count. Other repeated vertices and zero-length edges are rejected.

Does the direction of the outline matter?

Both directions are valid. Reversing the order changes only the winding label; area, perimeter and centroid stay the same. Reordering vertices so edges cross is an error, but clockwise order itself is not.

Can the polygon be non-convex?

Yes, provided the outline is simple, without crossings or overlaps. For a crossing outline the shoelace sum is signed and a filled-region area needs a chosen fill rule; this tool does not present that sum as the area of a simple region.

What units does the result use?

Coordinates and centroid use one length unit you choose; perimeter uses that unit and area its square. Do not mix metres and centimetres between points; units are not detected automatically.

Why is a straight line rejected?

Because three collinear points do not enclose anything. Showing zero would look like a valid answer to an invalid figure.