The Solar System is the gravitationally bound system of the Sun and the masses that orbit it, most prominently its eight planets, of which Earth is one. The system formed about 4.6 billion years ago when a dense region of a molecular cloud collapsed, creating the Sun and a protoplanetary disc from which the orbiting bodies assembled. Inside the Sun's core hydrogen is fused into helium for billions of years, releasing energy which is over even longer periods of time emitted through the Sun's outer layer, the photosphere. This creates the heliosphere and a decreasing temperature gradient across the Solar System.
The mass of the Solar System is by 99.86% almost completely made up of the Sun's mass. The next most massive objects of the system are the eight planets, which by definition dominate the orbits they occupy. Closest to the Sun in order of increasing distance are the four terrestrial planets – Mercury, Venus, Earth and Mars. These are the planets of the inner Solar System. Earth and Mars are the only planets in the Solar System which orbit within the Sun's habitable zone, in which the sunlight can make surface water under atmospheric pressure liquid. Beyond the frost line at about five astronomical units (AU), are two gas giants – Jupiter and Saturn – and two ice giants – Uranus and Neptune. These are the planets of the outer Solar System. Jupiter and Saturn possess nearly 90% of the non-stellar mass of the Solar System.