Eventually, the oceans will evaporate into space. Earth has been habitable for 4.5 billion years. Only half a billion years are left. These are the findings of research by Dr. James F. Kasting, professor of meteorology and geosciences, a faculty member with the College of Earth and Mineral Sciences of Penn State University. They typically thought it would occur only when the sun left the main sequence in 5 billion years.
Stars leave the main sequence when they stop burning hydrogen.
The sun, a yellow, G-2 star, will then become a red giant encompassing the orbit of Mercury. Mercury will disappear and Venus will lose its atmosphere and become a burnt out planet. The Earth will suffer the same fate, even though it is outside the red giant's immediate reach. However, the oceans may evaporate much earlier. According to calculations, a somewhat pessimistic and worst case scenario that does not include the effects of clouds, it could be in a billion years.