Calculator: Polygon area and centroid

Enter the labelled inputs to calculate: Area; Value Cx; Value Cy; Perimeter; Area ±.

Area
4
Value Cx
1
Value Cy
1
Perimeter
8
Area ±
4

How the calculation works

cᵢ=xᵢyᵢ₊₁−xᵢ₊₁yᵢ; 2A=Σcᵢ; Cx=Σ(xᵢ+xᵢ₊₁)cᵢ/(6A)

Use one coordinate unit throughout. Triangle vertices must be non-collinear. Polygon vertices must follow the boundary of a simple non-self-intersecting polygon; orientation changes the signed area.

Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Frequently asked questions

How is the result calculated?

cᵢ=xᵢyᵢ₊₁−xᵢ₊₁yᵢ; 2A=Σcᵢ; Cx=Σ(xᵢ+xᵢ₊₁)cᵢ/(6A)

What assumptions apply?

Use one coordinate unit throughout. Triangle vertices must be non-collinear. Polygon vertices must follow the boundary of a simple non-self-intersecting polygon; orientation changes the signed area.

How precise are the displayed results?

Numerical results show up to ten significant digits. Rounding does not improve the accuracy of the input measurements or the model. Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

How we verified this calculator

The calculator is checked against 3 reference cases computed independently of its code. Last passed: .

# Inputs Expected result
1
Values (spaces or semicolons; decimal point) X = 0 4 4 0
Values (spaces or semicolons; decimal point) Y = 0 0 3 3
Area: 12
Value Cx: 2
Value Cy: 1.5
Perimeter: 14
2
Values (spaces or semicolons; decimal point) X = 0 6 3
Values (spaces or semicolons; decimal point) Y = 0 0 5
Area: 15
Value Cx: 3
Value Cy: 1.666666667
Perimeter: 17.66190379
3
Values (spaces or semicolons; decimal point) X = 1 5 6 2 -1
Values (spaces or semicolons; decimal point) Y = 1 0 4 6 3
Area: 25.5
Value Cx: 2.784313725
Value Cy: 2.921568627
Perimeter: 19.78941502

How we test our calculators →

Also try:

Back to category →