Final answer:
The Sun will leave the main sequence and become a red giant in about 5 billion years, as a 1 solar mass star like the Sun spends approximately 10 billion years on the main sequence.
Step-by-step explanation:
The Sun is currently in the main-sequence phase of its evolution, a phase characterized by the stable fusion of hydrogen into helium in its core. According to stellar evolution theory and data from astronomical observations, a star with the Sun's mass of 1 solar mass typically spends about 10 billion years on the main sequence. Given that our Sun is roughly 4.5 billion years old, it will leave the main sequence and become a red giant in about 5 billion years from now. This transition marks the end of its peaceful hydrogen-burning phase and the beginning of more tumultuous end-of-life stages for the star.