Convert your coordinates into decimal format if they are not already. Usually, you find latitude and longitude coordinates in "Degrees, Minutes, Seconds" (DMS) format. For example, Los Angeles is located at 34° 3' 8 N latitude and 118° 14' 37 W longitude. Convert minutes into degrees by multiplying the second number (3 for latitude and 14 for longitude) by the fraction 1/60, you should get .0500 and .2333, respectively. Convert seconds to degree by multiplying the third number by 1/60 to convert it into minutes, then by 1/60 again to convert the minutes into degrees. For the example's latitude, 8 seconds, this would be .0022 and for the longitude of 37, this computes to .0103. Add the minutes and seconds together and place them behind the decimal, with the degrees in front. Using this format, the latitude becomes 34.0522° N and longitude 118.2436° W. Express "N" and "E" numbers as positives and "W" and "S" numbers as negatives. Los Angeles's decimal coordinates are therefore 34.0522, -118.2436.
Convert your decimal degrees into radians using the formula r= d*(π/180), where π=3.14159. Los Angeles's latitude in radians is therefore (34.0522)(3.14159/180), or (34.0522)(.01745) or .5942 radians. Its longitude, then, is (-118.2436)(3.14159/180), or (-118.2436)(.01745) or -2.0634 radians.
Repeat these steps for your destination. For example, if you want to calculate the distance between Los Angeles and Tokyo, convert Tokyo's DMS coordinates--35° 41' 6 N, 139° 45' 5 E--into decimal format--35.6850, 139.7514--and then into radians--.6227, 2.4387.
Calculate the change in latitude and longitude by subtracting your destination's coordinates from your origin's. The change in latitude between Los Angeles and Tokyo is (.5942 - .6227), or .0285 radians, keeping in mind that distance can't be negative. The change in longitude is (-2.0634 -2.4387), or 4.5021 radians.
Populate the equation "a = [sin²("lat/2) + cos(lat1)] x cos(lat2) x sin²("long/2)" with values for your locations, keeping in mind that """ ("delta") means "change" and "sin²x" means (sinx)². Los Angeles-Tokyo is as follows: a = [sin²(.285/2) + cos(.5942)] x cos(.6227) x sin²(4.5021/2) = [sin²(.1425) + cos(.5942)] x cos(.6227) x sin²(2.2511) = [.02017 + .82860] x .81231 x .60432 = .84877 x .81231 x .60432 = .41666
Use this value, "a," to populate a second intermediate equation, c = 2 x arctan(√a/√(1'a)), where "arctan" is the inverse "tangent" function, notated "tan^'1" on some calculators. For Los Angeles to Tokyo, do this as follows: c = 2 x arctan(√.41666/√(1'.41666)) = 2 x arctan(.64550/.76377) = 2 x arctan(.84515) = 2 x .70167 = 1.40334.
Compute distance, in kilometers, using the formula d = R x c, where "R" represents the Earth's radius, or 6,371 km. For Los Angeles to Tokyo, then, the distance is 6,371 x 1.40334, or 8,940 km. Convert the distance into miles if you wish, keeping in mind that one mile = 1.609 km. The distance from Los Angeles to Tokyo in miles, then, is 8,940/1.609 or 5,556 miles.