What you're really asking is when will life on Earth end. I doubt the Earth will end. Life on it may die out, but just 'cause nothing on the planet is alive doesn't mean the end of the planet. Maybe we'll be wiped out like the dinosaurs and something new will take our place.