The meaning of the age of the Earth defined by lead isotopes has long been unclear. Recently it has been proposed that the age of the Earth deduced from lead isotopes reflects volatile loss to space at the time of the Moon-forming giant impact rather than partitioning into metallic liquids during protracted core formation. Here we show that lead partitioning into liquid iron depends strongly on carbon content and that, given a content of approximately 0.2% carbon, experimental and isotopic data both provide evidence of strong partitioning of lead into the core throughout the Earth's accretion. Earlier conclusions that lead is weakly partitioned into iron arose from the use of carbon-saturated (about 5% C) iron alloys. The lead isotopic age of the Earth is therefore consistent with partitioning into the core and with no significant late losses of moderately volatile elements to space during the giant impact.