html – How to create a distance generator

I want to use html to create something that will generate the miles that someone has to travel to go somewhere. So, someone would enter his current location and where he wants to go, and the code would tell him the distance to go. The problem is that I do not know where to start.