White dwarfs are the final evolutionary state of all stars whose mass is not high enough to become a neutron star. Over 97% of the stars in the Milky Way will become white dwarf stars. After the hydrogen–fusing lifetime of a main-sequence star ends, it will expand to a red giant which fuses helium to carbon and oxygen in its core. If a red giant does not have enough mass to fuse carbon, around 1 billion K, inactive carbon and oxygen will build up at its center. After shedding its outer layers to form a planetary nebula, it will leave behind the core, which is the white dwarf.