Red giants are old stars that have spectral types G to M, thus temperatures ranging from 5,000 to 3,000 degrees Kelvin, and are more than 1,000 times more luminous. Red giants were born as main-sequence stars, but after a few million or billion years, started fusing their hydrogen fuel into heavier elements within their cores such as oxygen. Red giants can be anywhere from 7 to 1,000 times the sun's diameter. There are three types of red giants, depending on their placement within the Hertzsprung-Russel diagram:
Asymptotic giant branch
The Sun as a red giant
In about 5 to 6 billion years, the Sun will have depleted all of the hydrogen fuel in its core. It will shrink slightly at first, with the hydrogen outside the core able to compress enough for hydrogen there to fuse, and will begin to expand into a subgiant. Eventually, the pressure builds up so much that the core will begin to fuse helium, and will expand to become a red giant star; at its largest, its photosphere will approximately reach the current orbit of Mars. It will then lose its atmosphere completely; its outer layers forming a planetary nebula and the core shrinks to become a white dwarf. The evolution of the Sun into and through the red-giant phase has been extensively modelled, but it still remains unclear whether Earth will be engulfed by the Sun or will continue orbiting it. The uncertainty arises in part because as the Sun burns hydrogen, it loses mass, causing Earth and the other planets to orbit farther away. There are also significant uncertainties in calculating the orbits of the planets over the next 5 to 6,5 billion years, so the fate of Earth is not yet well understood. At its brightest, the red giant Sun will be several thousand times more luminous than today but its surface will be at about half the temperature.