By measuring this shift, the relative motion of the earth and the star can be calculated (see Red Shift).

And further: the distance to a star can be determined by measuring its red shift. The shift is proportional to the speed of movement to-or-from the observer, and (in the case of stars) that speed is proportional to the distance to the star.