calculate the numerical distance​