Calculate the distance has been completed