Leavitt attended Oberlin College for two years (1886–88) and then transferred to the Society for the Collegiate Instruction of Women (later Radcliffe College), from which she graduated in 1892. Following an interest aroused in her senior year, she became a volunteer assistant in the Harvard Observatory in 1895. In 1902 she received a permanent staff appointment. From the outset she was employed in the observatory’s great project, begun by Edward C. Pickering, of determining the brightnesses of all measurable stars. In this work she was associated with the older Williamina Fleming and the more nearly contemporary Annie Jump Cannon. Pickering's staff, being primarilly made up of women, became known as "Pickering's Harem" or "Pickering's Computers".
Leavitt soon advanced from routine work to a position as head of the photographic stellar photometry department. A new phase of the work began in 1907 with Pickering’s ambitious plan to ascertain photographically standardized values for stellar magnitudes. The vastly increased accuracy permitted by photographic techniques, which unlike the subjective eye were not misled by the different colours of the stars, depended upon the establishment of a basic sequence of standard magnitudes for comparison. The problem was given to Leavitt, who began with a sequence of 46 stars in the vicinity of the north celestial pole. Devising new methods of analysis, she determined their magnitudes and then those of a much larger sample in the same region, extending the scale of standard brightnesses down to the 21st magnitude. These standards were published in 1912 and 1917.
She then established secondary standard sequences of from 15 to 22 reference stars in each of 48 selected “Harvard Standard Regions” of the sky, using photographs supplied by observatories around the world. Her North Polar Sequence was adopted for the Astrographic Map of the Sky, an international project undertaken in 1913, and by the time of her death she had completely determined magnitudes for stars in 108 areas of the sky. Her system remained in general use until improved technology made possible photoelectrical measurements of far greater accuracy. One result of her work on stellar magnitudes was her discovery of 4 novas and some 2,400 variable stars, the latter figure comprising more than half of all those known even by 1930. Leavitt continued her work at the Harvard Observatory until her death.
Leavitt’s outstanding achievement was her discovery in 1912 that in a certain class of variable stars, the Cepheid variables, the period of the cycle of fluctuation in brightness is highly regular and is determined by the actual luminosity of the star. The subsequent calibration of the period-luminosity curve allowed American astronomers Edwin Hubble, Harlow Shapley, and others to determine the distances of many Cepheid stars and consequently of the star clusters and galaxies in which they were observed. The most dramatic application was Hubble’s use in 1924 of a Cepheid variable to determine the distance to the great nebula in Andromeda, which was the first distance measurement for a galaxy outside the Milky Way. Although it was later discovered that there are actually two different types of Cepheid variable, the same method can still be applied separately to each type.