Polygon & Multi-Point Centroid Calculator
Find the geometric centroid of any polygon or coordinate set — paste coordinates or GeoJSON and get the centroid in decimal degrees and DMS, ready for QGIS label placement or logistics optimisation.
Computing Centroid...
Enter coordinates or paste a GeoJSON geometry and click Find Centroid to see the results.
How the Centroid Is Computed
The orb/planar package uses the shoelace formula for polygons and arithmetic mean for point sets — pure Go, no GDAL required.
What Is a Centroid?
The centroid is the geometric centre of a shape — the arithmetic average of all the points that make it up, weighted by the area or length they contribute. For a physical object of uniform density, the centroid coincides with the centre of mass, which is why engineers sometimes use the terms interchangeably.
In GIS and spatial analysis, the centroid serves as a representative point for a polygon feature. QGIS and ArcGIS use the polygon centroid as the default anchor for feature labels on a map. It is also used in logistics (finding a central depot location), remote sensing (referencing a detected landslide or flood extent), and urban planning (locating the point of minimum aggregate travel distance within a service zone).
Importantly, the centroid of a polygon is not simply the centre of the bounding box. It is the area-weighted geometric average of the polygon vertices. For a long, narrow country like Chile, the centroid sits far south of the bounding-box midpoint because the wider southern region contributes more area to the average.
How Is the Polygon Centroid Calculated?
This calculator uses the shoelace formula (Gauss's area formula) to compute the signed area and area-weighted centroid of a polygon simultaneously. For a simple polygon with vertices (x₁,y₁) … (xₙ,yₙ):
A = ½ × Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ) Cx = (1 / 6A) × Σ (xᵢ + xᵢ₊₁)(xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ) Cy = (1 / 6A) × Σ (yᵢ + yᵢ₊₁)(xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)
The formula is exact for any simple (non-self-intersecting) polygon regardless of the number of sides. Polygons with holes (donuts) are handled by subtracting the hole centroids weighted by their areas from the outer ring centroid.
For multi-polygons, each constituent polygon's centroid is weighted by its own area and combined into a single result. For line geometries, the centroid is the length-weighted midpoint of the segments.
Multi-Point Centroid vs Polygon Centroid — What Is the Difference?
A multi-point centroid (the centre of gravity of a point cloud) is the arithmetic mean of all coordinates:
Cx = (x₁ + x₂ + … + xₙ) / n Cy = (y₁ + y₂ + … + yₙ) / n
Every point is weighted equally. This is used in logistics problems (finding an optimal depot location for n delivery addresses) and as the update step in k-means clustering. Use this mode when you have a set of discrete locations — customer addresses, GPS waypoints, survey control points — and want their geographic centre.
A polygon centroid weights each part of the polygon by the area it contributes, not just the vertices. For regular shapes like squares and equilateral triangles, both methods give the same result. For irregular or elongated polygons, only the area-weighted centroid correctly reflects the true geometric centre.
Practical Uses: Logistics, Urban Planning, and GIS Label Placement
- GIS label placement — QGIS and ArcGIS use the polygon centroid as the default anchor for feature labels. If the automatic centroid falls outside an irregular polygon (e.g. a concave bay or an atoll), use this tool to compute a more intuitive placement coordinate.
- Logistics and supply-chain — Given a set of delivery addresses or store locations, the multi-point centroid provides the initial estimate for an optimal depot or distribution-centre location before further route-optimisation.
- Urban and land-use planning — The centroid of a service-area polygon (a school catchment, a flood-risk zone, a rezoning boundary) identifies the point that minimises aggregate travel distance within the zone.
- Remote sensing and disaster response — The centroid of a detected landslide scar, wildfire perimeter, or flood extent is used as the reference coordinate in event reports and in spatial queries against infrastructure databases.
- Game development and simulation — The centroid of a spawn zone or region of interest is used as the default spawn point, camera anchor, or minimap icon position.
Planar vs Geodetic Centroid — When Does It Matter?
This calculator uses a planar (Euclidean) centroid — it treats longitude and latitude as X and Y coordinates on a flat grid. For areas smaller than a few hundred kilometres, the planar centroid is accurate to within a few metres and is perfectly suitable for city, district, and country-scale work.
For very large polygons spanning many degrees of longitude at high latitudes, the planar centroid can deviate from the true geodesic centroid. This is because one degree of longitude is only 55.8 km wide at 60°N versus 111.3 km at the equator — a planar calculation treats them as equal, overstating the influence of eastern and western extents at high latitudes.
As a rule of thumb: for polygons smaller than a single country, the planar centroid error is below 1 km and is negligible for mapping purposes. For continental or ocean-basin scale analysis, project to an equal-area CRS (such as EPSG:6933 WGS84 / NSIDC EASE-Grid 2.0 Global) before computing the centroid.
Geometry Type Reference
| Geometry Type | Centroid Method | Area Returned? |
|---|---|---|
| Point | The point itself | No |
| MultiPoint | Arithmetic mean of all coordinates | No |
| LineString | Length-weighted midpoint of segments | No |
| Polygon | Shoelace signed-area formula | Yes |
| MultiPolygon | Area-weighted combination of polygons | Yes (total) |
Frequently Asked Questions
How do I calculate the centroid of a polygon from GPS coordinates?
Paste your GPS coordinates (one latitude, longitude pair per line) into the tool, set the Coordinate Order to "Lat, Lon (GPS/Survey)", and click Find Centroid. The tool builds a MultiPoint geometry from the pairs and uses the arithmetic mean for discrete points. If your data represents a closed polygon boundary, switch to GeoJSON mode and paste the polygon geometry to get the area-weighted centroid.
Is the centroid the same as the geographic centre?
Not always. The geographic centre of a bounding box is the midpoint of the min/max extent, while the centroid is the area-weighted geometric average of the polygon. For convex shapes they are similar; for concave or elongated shapes — a crescent bay, a C-shaped district, or an irregular country — they can differ by tens of kilometres.
Why is the polygon centroid sometimes outside the polygon?
For concave polygons (shapes with inward-pointing vertices), the shoelace centroid can mathematically fall outside the boundary. Classic examples: a crescent, a C-shape, or any region with a large concave bay. This is geometrically correct but unintuitive. If you need a point guaranteed to be inside the polygon — for label placement or nearest-facility queries — use a pole-of-inaccessibility algorithm in QGIS (Processing → Pole of Inaccessibility).
How accurate is a planar centroid for geographic coordinates?
For areas covering less than a few hundred kilometres (most city, district, and single-country extents), the planar centroid is accurate to within a few metres — negligible for GIS mapping and logistics. For large polygons spanning many degrees at high latitudes (60°+), the error can reach a few kilometres. For continental or global analysis, project to an equal-area CRS before computing the centroid.
How do I use the centroid as a label point in QGIS or ArcGIS?
In QGIS, open the Layer Properties → Labels panel, enable Single Labels, and place them at the feature centroid (the default). To override with your own coordinates, use the Field Calculator to add a geometry column: make_point(your_lon, your_lat) and set the label placement property to that field. In ArcGIS, use the Label Manager → Placement Properties → Always Horizontal to anchor labels at a specific coordinate stored in a point feature class.
What is the difference between centroid and centre of mass?
For a physical object of uniform density (a flat lamina), the geometric centroid and the centre of mass are identical. If the density varies across the polygon — for example, population density in a census tract — the centre of mass (population-weighted centroid) shifts toward the denser areas while the geometric centroid remains unchanged. This calculator computes the geometric centroid only.
Related Calculators
Polygon Area Calculator
Calculate the area of any polygon from a list of coordinates
Haversine Distance Calculator
Great-circle distance between two lat/lon points
Coordinate Converter
Convert between decimal degrees, DMS, and UTM formats
GeoJSON Validator
Validate and inspect any GeoJSON file or geometry
GeoJSON to WKT Converter
Convert GeoJSON geometries to WKT for PostGIS