Polygon Centroid Finder: Find the Center Point of Any Shape on a Map

Draw a polygon on the map or open a GeoJSON or KML file. The tool shows the centroid and three other center points at once. Drag a corner and watch them move.

Map:
Draw a shape. The centers appear at once, and you can drag the corners
Try:
Loading the polygon centroid finder...
Need assistance with your GIS project?Explore Our Services
Four kinds of center
Centroid, bounding box center, corner average and a visual center that is always inside.
Live and editable
Drag the corners of the shape and the centers move with them.
Copy and download
Copy lat/lon, WKT or GeoJSON. Download GeoJSON, KML or CSV.
Rate this tool:

Polygon Centroid Finder: Find the Center Point of Any Shape on a Map

What This Polygon Centroid Finder Does

This tool finds the center of a shape. You draw a polygon or a rectangle on the map, or open a GeoJSON or KML file, and the tool shows four kinds of center point with their coordinates: the centroid, the bounding box center, the average of the corners and a visual center that is always inside the shape. You can drag the corners and watch the points move.

Use it to find the lat/lon of a parcel or a region, to place a label or a pin inside an odd shape, to turn polygons into points for a spreadsheet, or to check a shape you drew. You do not need to install software or have an account.

The Four Center Points

"The center of a shape" can mean more than one thing. The tool gives you all four so you can pick the one that fits your task.

RectangleL shapeC shapeRing with a holeCentroidVisual center and its circle
For a rectangle the two centers meet. For the C shape and the ring the centroid falls outside the shape, and the visual center stays inside.
The four center points compared
CenterHow it is foundAlways inside?Use it for
CentroidThe average position of all the area (center of mass).NoBalance point, average location, and the standard point for a polygon in GIS.
Bounding box centerThe middle of the smallest box that holds the shape.NoCentering a map view on the shape.
Corner averageThe average of the corner points.NoQuick checks. It depends on how many corners each side has.
Visual centerThe center of the largest circle that fits inside the shape.YesPlacing a label, a pin or an icon inside the shape.

What You Get

  • The centers on the map, as colored markers you can show or hide.
  • The latitude and longitude of each center, in decimal degrees or in degrees, minutes and seconds.
  • Copy buttons for lat/lon, WKT and a GeoJSON point.
  • The area, the outline length, the number of corners and the largest circle that fits in the shape.
  • A GeoJSON, KML or CSV download and a link that opens the same shape for someone else.

What Is a Centroid?

The centroid is the center of mass of a flat shape. Think of the shape cut from card: you can balance it on a pin at its centroid. For a polygon with corners (x1, y1) to (xn, yn), the tool finds it from the area of each piece:

A = 1/2 x sum of (x(i) x y(i+1) - x(i+1) x y(i))
Cx = 1/(6 x A) x sum of (x(i) + x(i+1)) x (x(i) x y(i+1) - x(i+1) x y(i))
Cy = 1/(6 x A) x sum of (y(i) + y(i+1)) x (x(i) x y(i+1) - x(i+1) x y(i))

A hole counts as negative area, so the centroid moves away from the hole. When there are several shapes, each centroid is weighted by the area of its shape.

Centroid of Common Shapes

For simple shapes the centroid has a known place. A triangle has its centroid at 0.333 of its height from the base, and a semicircle has it at 0.424 of its radius from the flat side. You can draw these shapes in the tool to check the numbers.

Where the centroid is for simple shapes
ShapeDistance of the centroid from the baseAs a part of the height or radius
RectangleHalf the height0.500
TriangleOne third of the height0.333
Semicircle4 x r / (3 x π) from the flat side0.424
Quarter circle4 x r / (3 x π) from each straight side0.424

When the Centroid Is Outside the Shape

For a shape that curves around a gap, such as a C or a crescent, the balance point can fall in the gap. The "A C-shaped area" example in the tool has an area of 46.8 hectares. Its centroid is at 40.75400, -73.98614, which is outside the shape. The visual center is 332 m away, inside the shape, and the largest circle that fits there has a radius of 167 m.

If you need a point that is on or in the shape, for example to place a label, use the visual center. If you need the average position of the area, use the centroid.

Centroid, Bounding Box Center and Corner Average

The bounding box center is easy to find but it ignores the shape inside the box. The corner average moves toward the side that has more corners. A coast drawn with many points on one side pulls the average to that side. The centroid depends only on the area, so adding corners along a straight edge does not change it.

Large Shapes and the Curve of the Earth

On a globe, the lines of longitude come together toward the poles, so the northern part of a shape is narrower than the southern part. The state of Colorado, drawn as a box from 37 to 41 degrees north, has an area of about 268,995 km². The middle of the box is at latitude 39.0000, but the centroid is at 39.0334, -105.55. The two are 3.7 km apart. Try the "The state of Colorado" example.

Coordinate Formats

You can show the coordinates as decimal degrees, with 2 to 10 decimals, or as degrees, minutes and seconds. The copy buttons give you what a program or a spreadsheet needs:

  • lat, lon in decimal degrees, for a map search box or a spreadsheet.
  • WKT, the text format of GIS databases. Note that WKT lists longitude first, for example POINT(-73.9857 40.7484).
  • GeoJSON, a point with the coordinates in the order longitude, latitude.
  • Degrees, minutes and seconds, for example 40° 44′ 54.2″ N, 73° 59′ 8.5″ W, are shown in the table when you choose them.

Typical Uses

A centroid turns a shape into one point. These are the common reasons people want that point.

Common uses of a polygon centroid
TaskWhy the centroid helps
Label or pin for a parcelPut the pin at the visual center so it falls inside the parcel, even for an odd shape.
Lat/lon for a region or a countyGive one coordinate for the whole shape, for example to sort or to measure distances.
Distance between areasMeasure from centroid to centroid instead of from an edge.
Joining data to a pointTurn each polygon into a point so it can be joined with a table of coordinates.
Weather or climate lookupAsk a service for the value at the center of a field or a city.
Map view and zoomCenter the map on the middle of the shape, using the bounding box center.
Sales or service areaFind the middle of a territory and plan a depot or a visit from there.
Checking a drawn shapeDrag a corner and see how the balance point moves.

Files: Open and Download

You can open GeoJSON (.geojson, .json) and KML files. The tool reads the polygons in them, including polygons with holes and multi-part shapes, and finds the centers of every shape and of all of them together.

You can download the centers as GeoJSON or KML, with the shapes added if you want, or as a CSV table with the name, method, latitude and longitude of each point. Open the files in Google Earth, QGIS or any GIS program. To see a file again, use the KML Viewer.

How to use the Polygon Centroid Finder

1Draw the polygon

Choose Polygon and click the corners of the shape, then double-click to close it. Or choose Rectangle and click two corners. You can also open a GeoJSON or KML file.

Draw the polygon
2Read the center points

The map shows the centroid in red and the visual center in green. Tick the boxes to show the bounding box center and the corner average too.

Read the center points
3Move the corners

Click "Move corners" and drag a corner to a new place. The centers update while you drag. Right-click a corner to delete it.

Move the corners
4Copy or download

Choose decimal degrees or degrees, minutes and seconds. Press a button to copy the lat/lon, the WKT or a GeoJSON point, or download GeoJSON, KML or CSV.

Copy or download

Assumptions and Limits

  • The shape is laid on a flat plane centered on it, and the centroid is the center of mass of that flat shape. Areas and lengths are measured on a sphere with the Earth radius of 6,371 km. The result is accurate to a fraction of a percent of the shape size for shapes up to a few hundred km wide.
  • A polygon is a flat shape with straight edges between its corners. The tool does not follow the curve of the Earth between two corners.
  • The visual center is found to within about 0.5 m, or a small part of the shape size for a big shape. A shape with a very long, thin part can have more than one best point. The tool shows one of them.
  • To measure an area without finding its center, use the Area Calculator. To draw a zone around a shape, use the Buffer Zone Generator.

Frequently asked questions

What is the centroid of a polygon?

The centroid is the center of mass of the shape. If you cut the shape out of a flat sheet of equal thickness, it is the point where the sheet would balance on a pin. It is the average position of all the area, not of the corners.

How do I find the centroid of a polygon on a map?

Choose Polygon, click the corners of the shape on the map and double-click to close it. The tool shows the centroid as a red marker and lists its latitude and longitude. You can also open a GeoJSON or KML file.

Is the centroid the same as the center of the bounding box?

No. The bounding box center is the middle of the smallest box that holds the shape. It only matches the centroid for shapes that are symmetric, such as a rectangle. For a triangle or an L shape the two points are far apart.

Can the centroid be outside the polygon?

Yes, for shapes that curve around, such as a C, a crescent or a horseshoe. The C shape in the tool has an area of 46.8 hectares and its centroid falls 332 m away from the best inside point, in the gap of the C. In that case use the visual center.

What is the visual center?

It is the point inside the shape that is farthest from every edge, also called the pole of inaccessibility. It is the center of the largest circle that fits in the shape, so it is always inside. Use it to place a label or a pin. The tool draws that circle with a dashed line, and for the C shape its radius is 167 m.

What is the difference between the centroid and the average of the corners?

The corner average counts only the corner points. If one side of the shape has many more corners, for example along a curved coast, the average moves toward that side. The centroid does not depend on how many corners a side has.

How are polygons with holes handled?

The hole is treated as missing area. A ring with a hole has its centroid in the middle, but the centroid of a shape with a hole near one side moves away from the hole. Open a GeoJSON or KML file with holes to try it.

What if I have several shapes?

The tool shows the centers of the shapes together, weighted by area, and the centers of each shape in a table. A big shape counts more than a small one.

Which coordinate formats can I get?

Decimal degrees (for example 40.75400, -73.98614), degrees, minutes and seconds (for example 40° 44′ 54.2″ N, 73° 59′ 8.5″ W), WKT (for example POINT(-73.9857 40.7484)) and a GeoJSON point. You can choose from 2 to 10 decimals.

Why does the centroid of a big area not match a flat map?

The tool measures on a sphere. For a shape that is 7 degrees wide and 4 degrees tall, like the state of Colorado, the centroid is at 39.0334, -105.55, while the middle of the box is at latitude 39.0000. The two are 3.7 km apart, because the northern part of the shape is narrower.

How accurate is the result?

The tool lays the shape on a flat plane centered on it and finds the center of mass there. For shapes up to a few hundred kilometers wide the result is right to a fraction of a percent of the shape size. For a very large shape the center differs slightly from a center on the globe.

Can I use the result in QGIS or other GIS software?

Yes. Download GeoJSON and open it in QGIS, ArcGIS or any GIS program. The file has a point for each center, and you can add the shapes too. For Google Earth, download KML.

Is my data sent to a server?

No. The centers are found in your browser, and a file you open stays in your browser. Only the address search sends the text you type to a search service.

Is the Polygon Centroid Finder free?

Yes. It is free, it needs no account, and you can use it as often as you like.