The Following Result is obtained from our Internet Research Algorithm :
There are various threats and possibilities that Earth could destroy and its life will end, some of the possible timelines are :
Volcanic Apocalypse - 0 - 100 million years
Asteroid Threat - 0 - 450 million years
When the core freezes over 3 - 4 billion years
Gamma-ray burst (here's a nearby binary star called WR 104 that might produce one within 500,000 years, but even if it does it might well miss us)
Wandering stars - within next million years
Expanding Sun - 1 - 7.5 billion years