In connection with my previous post on visualizing US ZIP codes, here are some links to ZIP code data.
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 ZIP Code Lookup and Address Information page http://www.usps.com/ncsc/ziplookup/lookupmenu.htm
ZIP Code FAQ
ZIP Code lookup service
US CENSUS BUREAU ZIP Code information and FAQs http://www.census.gov/geo/www/tiger/tigermap.html#ZIP
Census 2000 U.S. Gazetteer Files
2000 5-Digit ZIP Code Tabulation Areas
2000 3-Digit ZIP Code Tabulation Areas
Text file of ZIP Codes and centroids
1990 ZIP Code file with lat/lon centroids
Zip Codes are Not Areas! http://exchange.manifold.net/manifold/manuals/5_userman/mfd50Zip_Codes_are_Not_Areas.htm
As with most public domain data, there are many commercial enhancements and services created with specific uses of the data in mind. Here is just one such company: