The use of hafnium-tungsten chronometry to date the Moon is hampered by cosmogenic tungsten-182 production mainly by neutron capture of tantalum-181 at the lunar surface. We report tungsten isotope data for lunar metals, which contain no 181Ta-derived cosmogenic 182W. The data reveal differences in indigenous 182W/184W of lunar mantle reservoirs, indicating crystallization of the lunar magma ocean 4.527 ± 0.010 billion years ago. This age is consistent with the giant impact hypothesis and defines the completion of the major stage of Earth's accretion.