how to calculate distance between two coordinates?

How do we calculate distance between two coordinates?

I have seen the http://project-osrm.org/docs/v5.15.2/api/#table-service but I do not know the distances result output, how it should be interpreted.

I already looked up the internet for days but still no answer . Hoping someone could assist me. Thanks in advance.

I think http://www.movable-type.co.uk/scripts/latlong.html is a good resource

Excel: ACOS(SIN(A3*$C$2)SIN(A4$C$2)+COS(A3*$C$2)COS(A4$C$2)COS(B4$C$2-B3*$C$2))*6371

Cell A1: text Latitude
Cell B1: text Longitude
Cell C1: text Distance (km)
Lat. in column A
Lon. in column B
Constant value 0.0174532925 in cell $C$2

Example:
Latitude Longitude Distance (km)
0.0174532925
52.12662 4.44810 8.384
52.05691 4.49487

I am using http://project-osrm.org/docs/v5.15.2/api/#table-service. Any ideas what part of that json result where you can get the distance travelled ?