title: How to calculate distance between two latitude and longitude
body: <p>I would like to calculate distance between 2 points of latitude and longitude i have read about <strong>Haversine Formula</strong> and <strong>Spherical Law of Cosines</strong> for calculate distance between two points but my main motive is get best location difference between 2 points in Meters.</p>
  
  <p><strong>For Example</strong> Two devices place at next to each other and that android devices is sending location to server,So we need to take that location of each device and calculate minimum distance between these 2 device in meter.<strong>Difference of location should be like 2-3 meters</strong> when device is placed next to each others</p>
  
  <p>So what are the possible ways to calculate minimum distance between two device in meters when device next to each other</p>
  
  <p><strong>Edit 1:</strong> I need to calculate distance which i got in kms or miles which is big difference when device is next to each other. <strong>Haversine Formula</strong> and <strong>Spherical Law of Cosines</strong> is i found best way to calculate but i need to do more in these formulas to get minimum difference between 2 device.Not on Android Device. This question is not related to <a href="https://stackoverflow.com/questions/8049612/calculating-distance-between-two-geographic-locations">This Question</a></p>