The best spectrographs are limited in stability by their calibration light source. Laser frequency combs are the ideal calibrators for astronomical spectrographs. They emit a spectrum of lines that are equally spaced in frequency and that are as accurate and stable as the atomic clock relative to which the comb is stabilized. Absolute calibration provides the radial velocity of an astronomical object relative to the observer (on Earth). For the detection of Earth-mass exoplanets in Earth-like orbits around solar-type stars, or of cosmic acceleration, the observable is a tiny velocity change of less than 10 cm s(-1), where the repeatability of the calibration--the variation in stability across observations--is important. Hitherto, only laboratory systems or spectrograph calibrations of limited performance have been demonstrated. Here we report the calibration of an astronomical spectrograph with a short-term Doppler shift repeatability of 2.5 cm s(-1), and use it to monitor the star HD 75289 and recompute the orbit of its planet. This repeatability should make it possible to detect Earth-like planets in the habitable zone of star or even to measure the cosmic acceleration directly.