{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"polygon-area"},"result":{"entity_type":"calculator","id":"polygon-area","calculator_id":"polygon-area","canonical_url":"https://tttkmbb.com/math/polygon-area","name":"Polygon Area Calculator (Shoelace Formula)","title":"Polygon Area Calculator – Shoelace Formula Area, Perimeter, Centroid and Convexity from Vertex Coordinates","category":"math","category_name":"Math","tool_name":"calculate_polygon_area","featured_mcp_tool":false,"description":"Computes the area of a simple polygon from its vertex coordinates with the shoelace (Gauss) formula, plus its perimeter, centroid, orientation and whether it is convex.","use_when":"You have the (x, y) coordinates of a polygon's vertices in order around its boundary and need its area, centroid or perimeter, e.g. a land parcel, floor plan or map shape.","do_not_use_when":"The polygon is regular and you know only its side length (use regular-polygon), it is a triangle given by side lengths (use triangle-area), or the edges cross each other (the shoelace formula is not valid for self-intersecting polygons).","inputs":[{"name":"points","label":"Vertices (x,y)","type":"string_list","required":true,"description":"Vertices as x,y pairs in boundary order (clockwise or counter-clockwise), at least 3, e.g. 0,0 4,0 4,3 0,3. A repeated first point at the end is ignored.","example":["0,0","4,0","4,3","0,3"]}],"outputs":[{"name":"area","label":"Area","type":"number","decimals":6,"description":"|Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)| / 2 in the coordinate unit squared."},{"name":"perimeter","label":"Perimeter","type":"number","decimals":6,"description":"Sum of the edge lengths, including the closing edge."},{"name":"centroid_x","label":"Centroid x","type":"number","decimals":6,"description":"x of the area centroid, Σ (xᵢ + xᵢ₊₁)(xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ) / (6·A)."},{"name":"centroid_y","label":"Centroid y","type":"number","decimals":6,"description":"y of the area centroid."},{"name":"centroid","label":"Centroid","type":"string","decimals":4,"description":"The centroid as a coordinate pair, e.g. '(2, 1.5)'."},{"name":"is_convex","label":"Convex","type":"boolean","decimals":4,"description":"true when every turn along the boundary is in the same direction."},{"name":"orientation","label":"Vertex order","type":"string","decimals":4,"description":"'counter-clockwise' (positive signed area) or 'clockwise'."},{"name":"vertex_count","label":"Number of vertices","type":"integer","decimals":0,"description":"Vertices used after dropping a repeated closing point."}],"input_schema":{"type":"object","properties":{"points":{"description":"Vertices as x,y pairs in boundary order (clockwise or counter-clockwise), at least 3, e.g. 0,0 4,0 4,3 0,3. A repeated first point at the end is ignored.","type":"array","items":{"type":"string"},"examples":[["0,0","4,0","4,3","0,3"]]}},"additionalProperties":false,"required":["points"]},"output_schema":{"type":"object","properties":{"area":{"description":"|Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)| / 2 in the coordinate unit squared.","type":"number"},"perimeter":{"description":"Sum of the edge lengths, including the closing edge.","type":"number"},"centroid_x":{"description":"x of the area centroid, Σ (xᵢ + xᵢ₊₁)(xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ) / (6·A).","type":"number"},"centroid_y":{"description":"y of the area centroid.","type":"number"},"centroid":{"description":"The centroid as a coordinate pair, e.g. '(2, 1.5)'.","type":"string"},"is_convex":{"description":"true when every turn along the boundary is in the same direction.","type":"boolean"},"orientation":{"description":"'counter-clockwise' (positive signed area) or 'clockwise'.","type":"string"},"vertex_count":{"description":"Vertices used after dropping a repeated closing point.","type":"integer"}}},"formula":"A = ½ |Σᵢ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)| (indices wrap around); perimeter = Σ √((xᵢ₊₁ − xᵢ)² + (yᵢ₊₁ − yᵢ)²); centroid = (Σ (xᵢ + xᵢ₊₁)·cᵢ, Σ (yᵢ + yᵢ₊₁)·cᵢ) / (6·A_signed) with cᵢ = xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ","sources":[{"name":"Wikipedia – Shoelace formula","url":"https://en.wikipedia.org/wiki/Shoelace_formula","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Centroid – of a polygon","url":"https://en.wikipedia.org/wiki/Centroid#Of_a_polygon","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wolfram MathWorld – Polygon Area","url":"https://mathworld.wolfram.com/PolygonArea.html","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"Rectangle 4 × 3","inputs":{"points":["0,0","4,0","4,3","0,3"]},"expected":{"area":12,"perimeter":14,"centroid_x":2,"centroid_y":1.5,"centroid":"(2, 1.5)","is_convex":true,"orientation":"counter-clockwise","vertex_count":4},"url":"https://tttkmbb.com/api/v1/calculate/polygon-area?points=0%2C0%2C4%2C0%2C4%2C3%2C0%2C3"},{"name":"Pentagon (3,4) (5,11) (12,8) (9,5) (5,6)","inputs":{"points":["3,4","5,11","12,8","9,5","5,6"]},"expected":{"area":30,"perimeter":26.090056,"centroid_x":7.166667,"centroid_y":7.611111,"is_convex":false,"orientation":"clockwise","vertex_count":5},"url":"https://tttkmbb.com/api/v1/calculate/polygon-area?points=3%2C4%2C5%2C11%2C12%2C8%2C9%2C5%2C5%2C6"}],"faq":[{"q":"Does the vertex order matter?","a":"The vertices must follow the boundary (either direction); listing them in a different order describes a different, possibly self-intersecting, polygon. Clockwise input only changes the sign of the signed area, which is reported as orientation."},{"q":"Can I use latitude/longitude?","a":"Only for small areas after projecting to metres (e.g. UTM); degrees of longitude are not the same length as degrees of latitude, so raw coordinates give wrong areas."}],"tags":["polygon area","shoelace formula","area from coordinates","centroid of polygon","irregular polygon","surveyor's formula"],"related":[{"calculator_id":"regular-polygon","reason":"Regular polygons from side length or radius."},{"calculator_id":"triangle-area","reason":"Triangle area from sides, base and height or coordinates."},{"calculator_id":"distance-2d","reason":"Length of a single edge between two points."}],"links":{"html":"https://tttkmbb.com/math/polygon-area","markdown":"https://tttkmbb.com/math/polygon-area.md","json":"https://tttkmbb.com/math/polygon-area.json","api":"https://tttkmbb.com/api/v1/calculate/polygon-area","schema":"https://tttkmbb.com/api/v1/calculators/polygon-area","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T01:57:29Z"}