Earth is located within the "snow line" of the solar system, the region closest to the Sun where H2O is primarily in liquid or gaseous form, if at all. The snow line is located in the outer asteroid belt, between the orbits of Mars and Jupiter. The snow line phenomena is reflected in the water content of planets like Mercury, Venus, and Mars. Water is absent on Mercury. On Venus, H2O only exists as a trace element in the atmosphere. Mars only has a thin veneer of ice in its polar regions. In general, water is rare within the snow line.
Why does Earth have so much water relative to the other inner planets? 71% of the surface is covered in the oceans, more than half of which is deeper than 3,000 meters (9,800 ft), with an approximate total volume of 1.3 billion cu km (310 million cu mi). Still, the oceans only make up 0.023% of the Earth's total mass.
There are various theories as to where all the Earth's water came from, but several theories have fared better than the others. We know that the oceans existed as early as 100 million years after the formation of the Earth. When the Earth was in the process of forming, with a radius just 40% smaller than at present, it would have had enough gravity to hold on to a tenuous atmosphere with water vapor. The first water vapor on the planet would have come from the planet's internals, where volatile (low weight) chemicals would have a tendency to float to the top, and heavy chemicals (iron and nickel) would sink.
Though the first of Earth's water came about through volcanism, this alone probably didn't produce enough to form stable pools on the surface. More water was added to the planet during several hypothesized large impacts from asteroids from the outer asteroid belt. Comparing the isotope ratios of water on Earth and water from comets and asteroids has revealed that the majority of the Earth's water comes from asteroids.
Throughout its history, Earth's water has increased in volume due to biological processes. In the early seas of Earth, hydrogen sulfide would have been in great supply, which, when reacted with carbon dioxide from the atmosphere during photosynthesis in sulfide-reducing bacteria, would have produced hydrogen, sulfur, and water. Many geologists believe that the majority of Earth's water generated through this process.