I am trying to calculate the angle between two latitudes and longitudes but I am getting wrong result of `atan2(X,Y)`

when used on Excel.

```
β = atan2(X,Y) = atan2(0.05967668696, -0.00681261948)
```

It should be 1.68radian (96.51°) but on excel it is showing -0.113666736 (-6.512624235°)

```
β = atan2(X,Y),
```

where, X and Y are two quantities and can be calculated as:

- X =
`cos θb * sin ∆L`

Y =

`cos θa * sin θb – sin θa * cos θb * cos ∆L`

Latitude/Longitude(1): (Lat1,Lon1)= 39.099912, -94.581213

Latitude/Longitude(2): (Lat2,Lon2)= 38.627089, -90.200203

`‘L’ be the longitude, ‘∆L=lon2-lon1’ be the difference of longitude, ‘θ’ be latitude, ‘β‘ be Bearing`

`atan2()`

is giving me -0.11367 - so you're converting it to degrees, which you didn't indicate. – Raystafarian Aug 3 '15 at 18:04