How long will the sun survive ?
In about 5 billion years from now, the sun will turn into a red giant. It will eventually engulf the earth. Following the red giant phase, intense thermal pulsations will cause the Sun to throw off its outer layers, forming a planetary nebula. The only object that will remain after the outer layers are ejected is the extremely hot stellar core, which will slowly cool and fade as a white dwarf over many billions of years. A white dwarf is stable once formed and will continue to cool almost indefinitely. The subsequent lifetime of white dwarfs is thought to be on the order of the lifetime of the proton.