What formula is used for distance between 2 points in Google Maps?

What formula is used by Google Maps for calculating the shortest distance between 2 points (having their Lat, Lng coordinates)? Is it purely based on Haversine? Or is it something different? Is there a mathematical or code implemenatation reference available somewhere?

You can use the Google Maps Distance Calculator to find out the distance between two or more points anywhere on the earth. In other words, the distance between A and B. Click once on the map to place the first marker and then click again to position the second marker. The mileage between the points will then be displayed. You can also build up a series of locations to find a total distance. An important feature of this distance calculator tool is that is "as the crow flies"...

Calculating the "As the Crow Flies" distance is a matter of using Great Circle formula.

and the Great Circle formula reference is to http://en.wikipedia.org/wiki/Great-circle_distance which does provide various computational formulas.

If Google Maps is using the great circle distance then the results are within less than 1% of the geodesic distance for the ellipsoid. If you want to see the true ellipsoidal geodesic path in Google Maps, then visit