The haversine formula works by finding the great-circle distance between points of latitude and longitude on a sphere, which can be used to approximate distance on the Earth since it is mostly spherical.
The considerations we made so far are, in fact, valid only for distances calculated on planar surfaces but are not generally valid otherwise.
The distance we get should be multiplied by R, the radius of the earth.