The Solar System formed 4.568 billion years ago from the gravitational collapse of an area within a large molecular cloud. [g] This preliminary cloud was likely a number of light-years across and probably birthed numerous stars. As is normal of molecular clouds, this one consisted primarily of hydrogen, with some helium, and percentages of heavier aspects fused by previous generations of stars. As the area that would become the Solar System, referred to as the pre-solar nebula, collapsed, preservation of angular momentum caused it to turn quicker. The centre, where most of the mass collected, became increasingly hotter than the surrounding disc. As the contracting nebula rotated faster, it started to flatten into a protoplanetary disc with a diameter of roughly 200 AU and a hot, thick protostar at the centre. The worlds formed by accretion from this disc,  in which dust and gas gravitationally attracted each other, coalescing to form ever larger bodies. Hundreds of protoplanets may have existed in the early Solar System, however they either merged or were damaged, leaving the planets, dwarf worlds, and leftover minor bodies.
Due to their higher boiling points, only metals and silicates might exist in strong type in the warm inner Solar System close to the Sun, and these would ultimately form the rocky planets of Mercury, Venus, Earth, and Mars. Since metallic elements only made up an extremely little portion of the solar nebula, the terrestrial planets might not grow huge. The giant planets (Jupiter, Saturn, Uranus, and Neptune) formed even more out, beyond the frost line, the point in between the orbits of Mars and Jupiter where material is cool enough for volatile icy substances to remain strong. The ices that formed these worlds were more numerous than the metals and silicates that formed the terrestrial inner planets, enabling them to grow huge adequate to catch big atmospheres of hydrogen and helium, the lightest and most abundant elements. Remaining particles that never became planets congregated in areas such as the asteroid belt, Kuiper belt, and Oort cloud. The Great model is an explanation for the development of these areas and how the external worlds might have formed in different positions and moved to their existing orbits through various gravitational interactions.
Within 50 million years, the pressure and density of hydrogen in the centre of the protostar became fantastic adequate for it to start thermonuclear fusion. The temperature level, reaction rate, pressure, and density increased till hydrostatic balance was achieved: the thermal pressure equalled the force of gravity. At this moment, the Sun became a main-sequence star. The main-sequence stage, from starting to end, will last about 10 billion years for the Sun compared to around 2 billion years for all other stages of the Sun's pre-remnant life combined. Solar wind from the Sun produced the heliosphere and swept away the remaining gas and dust from the protoplanetary disc into interstellar space, ending the planetary development procedure. The Sun is growing brighter; early in its main-sequence life its brightness was 70% that of what it is today.
The Solar System will stay approximately as we understand it today till the hydrogen in the core of the Sun has actually been completely converted to helium, which will take place approximately 5 billion years from now. This will mark completion of the Sun's main-sequence life. At this time, the core of the Sun will collapse, and the energy output will be much greater than at present. The external layers of the Sun will broaden to roughly 260 times its existing diameter, and the Sun will become a red giant. Because of its significantly increased surface area, the surface area of the Sun will be substantially cooler (2,600 K at its coolest) than it is on the primary series. The broadening Sun is expected to vaporize Mercury and Venus and render Earth uninhabitable as the habitable zone moves out to the orbit of Mars. Eventually, the core will be hot enough for helium blend; the Sun