The Sun has a lifespan of approximately 10 billion years. It formed about 4.6 billion years ago and is currently in the middle of its main sequence phase, where it fuses hydrogen into helium in its core through the process of nuclear fusion. This process releases a tremendous amount of energy in the form of light and heat, which is what sustains life on Earth.
As the Sun continues to burn its hydrogen fuel, it gradually undergoes changes over time. As the hydrogen in the core gets depleted, the Sun will start fusing helium into heavier elements and will expand into a red giant phase. During this phase, the outer layers of the Sun will expand, engulfing Mercury, Venus, and possibly Earth.
After the red giant phase, the Sun will shed its outer layers, forming a planetary nebula, and leave behind a dense core known as a white dwarf. This white dwarf will gradually cool and fade over billions of years, eventually becoming a cold, dark remnant called a black dwarf.
It’s important to note that the exact duration of each phase of the Sun’s life cycle is influenced by various factors and subject to scientific uncertainties. Nevertheless, based on our current understanding, the Sun is estimated to have roughly 5 billion years left before it exhausts its nuclear fuel and reaches the end of its life as a white dwarf.