There are many, many websites that provide on-line services to calculate distances between ZIP Codes. Many commercial vendors provide ZIP Code data bases with address matching capabilities. The Census Bureau provides good information about the ZIP Code concept as it relates to mapping. The ZIP Code "area" is not designed as an actual polygon but instead is a collection of routes (transportation network), and they change often. Commercial companies have created ZIP Code boundary maps by interpolating the distances between instances of ZIP Codes on the ground (probably Post Office locations). The Census Bureau has been providing ZIP Code area centroids which is probably the dataset used in the distance calculation routines. To overcome this mapping difficulty, the Census Bureau has created the ZIP Code Tabulation Area (ZCTA) by using aggregations of Census blocks. But they warn that there is no correlation between the US Postal Service ZIP Codes and the US Census Bureau-created geography of those ZIP Codes. Each of datasets should be used with full knowledge of their method of creation and intended uses.

US Postal Service

US Census Bureau

ZIP Code Information and FAQs

ZIP Code Tabulation Areas

Census U.S. Gazetteer Files

As with most public domain data, there are many commercial enhancements and services created with specific uses of the data in mind. ZipDataFiles is just one such company.