This uses spherical trigonometry with something called the "Haversine" function ......here is a calculator to help :
http://www.movable-type.co.uk/scripts/latlong.html
Just enter the longitude and latitude of each point..........