According to astrobiologist Jack O'Malley-James of the University of St. Andrews in Scotland, the sun will grow large enough to extinguish all life on Earth in roughly 2.8 billion years. The planet's non-microbial life will become extinct in 800 million to 1.3 billion years.
Barring unforeseen events, such as impact events and gamma ray bursts, the lifespan of earth is dependant on the lifespan of the sun. Currently the sun is about half-way through its main-sequence and expanding in luminosity at a rate of approximately 10 percent per billion years. As luminosity increases so will the earth's surface temperature, exterminating first plant-life then complex animal-life and finally single-celled organisms.