Calculating county-to-county distances with GIS

In the Scholars’ Lab we recently worked with a researcher whose study areas focused on several groups of US counties. Of interest was the distance from every county within a group to every other county in that same group. We used geographic information systems (GIS) software to calculate these distances.

GIS software creates, manages, analyzes, and visualizes geographically referenced data.  Environmental Systems Research Institute (ESRI) in Redlands, California, produces ArcGIS desktop, a GIS software suite.  The following examples use ArcGIS ArcMap software version 9.3.1 at the ArcInfo product level.  Instructions for accessing GIS software at the University of Virginia are here:  If you are not affiliated with UVA, contact your local IT support person or ESRI for information on accessing this GIS software.

Calculating polygon centroids – When working with polygon features (like county boundaries) in GIS it is often necessary to locate the geographic center or centroid of each polygon as a point feature.  In ESRI’s ArcGIS desktop software the ‘Feature To Point’ tool creates polygon centroids.

For more information see the ArcGIS online help for the ‘Feature To Point’ tool:

Creating a point distance table – Given a set of point features, GIS software can calculate the straight-line distance from each point in the set to every other point in the set.   The output distance table contains one row for each point-to-point combination along with the calculated distance.  In ESRI’s ArcGIS desktop software the ‘Point Distance’ tool creates a point distance table.

Point Distance

For more information see the ArcGIS online help for the Point Distance tool:

Example using the ‘Feature To Point’ and ‘Point Distance’ tools – Given a polygon dataset representing boundaries of a group of US counties, calculate the distance between each county in the group and every other county in the group.

  1. After ensuring the county polygon boundary file is projected using a distance-preserving projection, select the county polygons for the study area.
  2. Convert the selected county polygons to county polygon centroid points using the ‘Feature To Point’ tool. Counties with Centroids
  3. Generate the point distance table for all county centroid points created in step 2 using the ‘Point Distance’ tool.  Distance is expressed in the linear unit of the input dataset, which is meters in our example.

As a former Geographic Information Systems Specialist for the Scholars' Lab, Kelly worked with faculty, staff, and students to visualize, analyze, create, and manage geographic data. He earned a master's degree in Geographic Information Science from Indiana University Purdue University Indianapolis. His research interests include applied geography and cartography as an art form.


  1. hi
    i need to calculate distance from different villages to one point (headquarter). Also i am using web server data for village points. how can i calculate the distance and make a suitable table.

  2. Hello, thank you for a helpful post. This is almost exactly what I’m trying to do on a project, but…

    Is it possible to do this same kind of analysis using polygon to polygon proximity, rather than using centroids? So, looking at the edges of the polygon and determining the shortest distance from one polygon to another polygon?

    Shortest distance from Polygon 1 to Polygon 2
    Polygon 1 to Polygon 3
    Polygon 1 to Polygon 4


    Thank you! Please let me know, I’m very interested.

  3. Hi,

    Thank you for the nice explanation.

    I used your approach to calculate the distances among communities in Flanders (the northern part of Belgium, Europe). The result is a 3 column table, the two relevant communities and the distance. However, I would like to bring this in a table with the communities on the top row and left column and the distances at the intersects.


    Anybody a suggestion on how this could be done efficiently? I have hundreds of communities, so manually is not really an option.

  4. So, what do you actually use for calculation. I am really struggling with this… help page and explanation was not helpful…..

    • The ArcGIS tool called ‘Point Distance’ calculates the distance and stores the distance value in the output table.

  5. For those asking about the unit of measure for results from the Point Distance tool, these units match the linear units of the coordinate system of your input dataset.

    If you are seeing very small numbers for distance values, it’s likely due to a projection issue. See the instructions for Step 1. Your county polygon layer must be projected using a distance-preserving (equidistant) projection. If your polygon layer is instead in an unprojected Geographic Coordinate System with units expressed in decimal degrees, the results will also be in decimal degrees, an angular measurement. These angular measurements are of no use in calculating distance.

    So be sure your polygon boundary file is projected before you begin step 1. See for an overview of projections and see for help on the Project tool.

  6. Kelly,

    Thanks for the guide on using the Point Distance tool. I’m running into the same problem as Adam in New York. I’m calculating the distance between county centroids and place centroids, but I keep getting values in the 0.1 to 1.9 range.

    Any tips?


  7. Kelly,

    This is great, but I’m still having trouble generating correct distance values. I’m calculating the distance between census tract centroids in New York State and I keep generating values in the range of 0.5-1.5. I have no idea what units these values are in; I am unable to find a conversion factor for miles that works consistently.

    I have tried changing the projection of my centroid shape file but that has not helped.

    Any advice would be much appreciated.

    Thank you,

  8. Hi Ty,

    The ArcGIS tool “Generate Near Table” eliminates the centroid bias you describe. This tool assigns a “0” distance to adjacent polygons. More info from the ArcGIS online help here:

    Kelly Johnston

  9. These final measurements are biased high since the centroid is used. ArcGis does not have a easily applied method for finding the distances between polygons (counties).