function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RuchieRuchie 

How to find the distance in miles between two US zip Codes

Hi All,

I need to find the distance in miles. If i provide to two zip codes of US, so it should calculate and give the distance in miles between the two. Can anyone help on this.

 

Thanks

Ruchie

 

Pat McQueenPat McQueen

Hello,

 

Typically people do this by doing math between the lattitude and longitude.  When you do distance between zips typically people use the center lat/lon as the location do to the distance.  Given the great tools on the web you may want to use actual addresses vs. just zips.  To get distance between two lats/lons is just math.   Below are two links .. One with code and one with the math!  Good luck!

 

pat 

  

 

http://www.codewalkers.com/c/a/Miscellaneous-Code/Calculate-Distance-Between-Two-ZIP-Codes/ 

http://mathforum.org/library/drmath/view/51722.html

 

hokusaihokusai

Check out this on the appexchange:

 

http://zipsearcher.vintara.com/