only their latitude and longitude are known. Distance Find you need in meters.
Answer 1, Authority 100%
(a great example of Bullshit in other answers)

First, in all popular
API
this functionality is already present – for example,Google.maps.geometry.Spherical.ComputedistanceBetween ()

Secondly, if you decide to realize the distance counting yourself, then it is much easier to apply a specialized
Haversine Formula
or more accurateVinceny Formula.
Example of using
Haverersine Formula
onjavascript
you can find here.
The calculation on specialized formulas makes sense to produce only at large distances. In addition, if such a calculation is needed – it is necessary to determine which type of line is a line of equal delets or a large circle, and which date and geoid will be used (usually use WGS84).
For the simplest calculations within a few kilometers, spherical formula is quite acceptable.
ANSWER 2, AUTHORITY 11%
Static Final Double Earth_radius = 6371009; // Land radius in m
/ **
* Returns Distance on the Unit Sphere; The Arguments Are in Radians.
* /
Private Static Double Distanceradians (Double Lat1, Double Lng1, Double Lat2, Double LNG2) {
RETURN ARCHAV (HAVDISTANCE (LAT1, LAT2, LNG1  LNG2));
}
/ **
* Returns The Length of the Given Path, In Meters, On Earth.
* /
Public Static Double ComputeLength (List & LT; Latlng & GT; Path) {
if (patch.size () & lt; 2) {
Return 0;
}
Double Length = 0;
Latlng prev = path.get (0);
Double Prevlat = Toradians (prev.latitude);
Double Prevlng = Toradians (Prev.longitude);
For (Latlng Point: Path) {
Double Lat = Toradians (point.latitude);
Double LNG = Toradians (Point.longitude);
Length + = Distanceradians (Prevlat, Prevlng, Lat, LNG);
prevlat = lat;
prevLNG = LNG;
}
Return Length * Earth_radius;
}
Stero from Android Maps Utils
How to use?
// list of points for comparison distance
ArrayList & LT; Latlng & GT; Latlnglist = new arraylist & lt; latlng & gt; ();
Latlnglist.add (new latlng (latitude1, longitude1));
Latlnglist.add (new latlng (latitude2, longitude2));
Double Plength = SPHERICALUTIL.COMPuteLength (LatlnGlist);
In the variable Plength
there will be a distance in meters
Answer 3
You need to apply Pythagore theorem. The difference in latitude is one or triangle catt, the difference in longitude is the other, and the hypotenuse is just the desired distance between the points.