Estimating time to travel between two lat/longs
This example is carried out using R.

Suppose there exists a data frame with latitude and longitude coordinates for two locations:

coors &lt;- data.frame(
  lat = c(48.8566,52.5200),
  long = c(2.3522,13.4050),
  stringsAsFactors = FALSE
)


The distance between the two points is calculated as follows:

&gt; p=0.017453292519943295
&gt; a = 0.5 - cos((coors$lat[2] - coors$lat[1]) * p)/2 + cos(coors$lat[1] * p) * cos(coors$lat[2] * p) * (1 - cos((coors$long[2] - coors$long[1]) * p)) / 2
&gt; distance &lt;-12742*sin(sqrt(a))
&gt; distance #Distance in kilometers
[1] 876.0783