Well, first you'd need to find the latitude and longitude of the two addresses. There are several sites on the Internet that will do this geocoding for you with a simple HTTP request, including Google. Then you just use simple spherical trigonometry to find the distance between those two sets of coordinates.
Okay, maybe not simple. But you can find the formula easily enough on the Internet, for example
here.