Life on Earth will continue for at least another 1.75 billion years ... but human life could die out long before.
Astrobiologists predict our planet will move out of the solar system's "habitable zone" and become too hot for even primitive bacteria. To survive, humans might have to migrate to Mars.
The calculations were based on our distance from the Sun and temperatures at which it is possible for the planet to retain water.
Andrew Rushby, of East Anglia University, said: "We used the 'habitable zone' concept to make these estimates.
"This is the distance from a planet's star at which temperatures are conducive to water on the surface. We estimate Earth will cease to be habitable somewhere between 1.75 billion and 3.25 billion years from now.
"After this point ... the seas would evaporate. We would see a terminal extinction event for all life."
He said conditions for humans would be intolerable much sooner. This was being accelerated by climate change.
"Humans would be in trouble with even a small increase in temperature. Near the end only microbes in niche environments would be able to endure the heat.
"If we ever needed to move to another planet Mars is probably our best bet."
Rushby said the length of time a planet could be inhabited indicated the potential for the evolution of complex life.
"We had insects 400 million years ago, dinosaurs 300 million years ago and flowering plants 130 million years ago. Modern humans have only been around for the last 200,000 years - so it takes a really long time for intelligent life to develop."