Unless you REALLY need to do the math, you should probably find an online utility to get the distance.
But since you asked…
I recently created a function for a program I’m working on. Here’s what I did.
Keep in mind that I am a programmer and not a mathmatician…
Start with decimal degrees instead of degrees and minutes. You can do the conversion on GC.com.
Convert each coordinate to radians:
A=(Point1Latitude * Pi /180)
B=(Point1Longitude * Pi /180)
C=(Point2Latitude * Pi /180)
D=(Point2Latitude * Pi /180)
Get the difference between the angles:
DLat=C-A
DLon=D-B
Now it gets fun…
X = Sin(DLat / 2) * Sin(DLat / 2) + Cos(A) * Cos(C) * Sin(DLon / 2) * Sin(DLon / 2)
Y = 2 * Atan2(Sqrt(X), Sqrt(1 - X))
To get miles, multiply Y by 3959.
Did I get it right Mathman?
Edited to add:
Atan2 might not be on your calculator. It is the angle whose tanget is the quotent of the two specified numbers.