NASA has calculated that life on Earth has around 1.5 billion years left before it becomes uninhabitable. While the planet will be consumed by the Sun in about 5 billion years, the real threat comes sooner.
As the Sun ages, it gradually gets hotter and brighter, leading to rising global temperatures. This will cause intense heatwaves, droughts, and the eventual evaporation of Earth’s oceans.
As more water vapor, a potent greenhouse gas, enters the atmosphere, the planet will experience a “moist runaway greenhouse effect,” accelerating global warming beyond the point where life can survive.