This web app tells you the amount of gas needed based on the distance between any two locations and specific car model. It makes use of the Google Maps Javascript API and Edmunds Javascript API.
Go to http://dhanush123.github.io/Gas-Calculator/gascalculator.html for a live demo.