Red giant and the creation of a planetary nebula finally ends the red-giant phase of the star's evolution. The red-giant phase typically lasts only around a billion years in total for a solar mass star, almost all of which is spent on the red-giant branch. The horizontal-branch and asymptotic-giant-branch phases proceed tens of times faster. If the star has about 0.2 to , it is massive enough to become a red giant but does not have enough mass to initiate the fusion of helium. These "intermediate" stars cool somewhat and increase their luminosity but never achieve the tip of the red-giant branch
Red-giant branch core becomes degenerate. The core still supports its own weight thermodynamically with the help of energy from the hydrogen shell, but is no longer in thermal equilibrium. It shrinks and heats causing the hydrogen shell to become thinner and the stellar envelope to inflate. This combination decreases luminosity as the star cools towards the foot of the RGB. Before the core becomes degenerate, the outer hydrogen envelope becomes opaque which causes the star to stop cooling, increases the rate of fusion in the shell, and the star has entered the RGB. In these stars, the subgiant phase occurs within a