Calculate the right position