***** To join INSNA, visit *****



Here’s the formula for calculating the distance between longitude-latitude coordinates based on the spherical law of cosines, including implementation code in JavaScript and Excel:


Spherical law of cosines:

d = acos(sin(lat1).sin(lat2)+cos(lat1).cos(lat2).cos(long2−long1)).R



var R = 6371; // radius of the earth, in km
var d = Math.acos(Math.sin(lat1)*Math.sin(lat2) +
                  Math.cos(lat1)*Math.cos(lat2) *
                  Math.cos(lon2-lon1)) * R;





Scott Social Media Allen

Social media is my middle name

Office: 512.487.7297

Mobile: 512.486.0701

Skype: ScottAllenTVH


_____________________________________________________________________ SOCNET is a service of INSNA, the professional association for social network researchers ( To unsubscribe, send an email message to [log in to unmask] containing the line UNSUBSCRIBE SOCNET in the body of the message.