That is a very interesting question.
The sun is currently about 4.5 billion years old and it is thought that it will spend a total of around 10 billion years as a main-sequence star. During this time it will continue to produce energy in its core by a process called nuclear fusion in which helium atoms are produced from hydrogen atoms (two hydrogen atoms are ‘fused’ together to form one helium atom), and will continue to get hotter. It is thought that the outer layers of the sun will expand as the hydrogen in the core is used up and that the sun will then enter a red giant phase, in about 5-5.5 billion years from now. The sun will then get even hotter and various changes will take place as the remaining hydrogen and helium are consumed, and helium fuses to form carbon. The outer layers of the sun will be thrown off to form what is known as a planetary nebula, and the remaining core of the sun will slowly cool and fade to become a white dwarf. This process is likely to take another several billion years. People think that this is the process and timeline the sun will face from studying the fate of other similar sized stars. So it will take several billion years (at least 5) before the sun will burn out – long after we are gone. I hope this answers your question.
That is a great answer Arti.
Addzyy69, i wouldnt be too worried about it, hopefully whom ever is around then, humans or whatever we turn into, will be long gone from the planet.
When the sun is burning out it will swell up and engulf the earth. Actually we will not be able to live on the earth for a long time prior as the sun will become so hot that it will boil earths water off. So we need to be gone long before the sun dies.