The Sun formed 4.6 million years ago from a giant cloud of gas and dust known as a solar nebula, which collapsed under the weight of its own gravity to form a spinning disk. The majority of material contained within this disk was pulled towards the center, forming the Sun. The Sun has enough fuel to remain relatively unchanged for the next 5 billion years.
The stellar nebula that formed the Sun was created from the collapse of a giant molecular cloud comprised mostly of hydrogen and helium. This cloud was large enough to give birth to many other stars in addition to the Sun. The Sun is about halfway through a phase known as the main-sequence stage, during which it fused hydrogen into helium. The Sun will exist as a main-sequence star for a total of approximately 10 billion years before expanding into a red giant large enough to engulf the orbits of the solar system's inner planets.
Once the Sun sheds its outer layer, the remaining core will collapse to form a white dwarf. The Sun is the largest object in the solar system and accounts for approximately 99.8 percent of its total mass. The Sun is roughly 109 times the size of the Earth, and the visible part of the Sun reaches temperatures of about 10,000 F.