I've heard some realistic predictions of about 400 more years. It'll take that long for pollution and overpopulation to kill the ecosystem, the oceans will be too warm for algea to make oxygen, and people will begin to suffocate, plants will start dying off. And there wont be enough resources to keep the billions of people alive. And living in space won't be possible except for a small % of people but they probably won't last long because living on Mars will also be tough. Plus with testosterone levels tanking there wont be enough fertile men to have children, so technology will be needed just to artificially grow viable babies. And it's all just going to be a catastrophic die off of humanity.
I really don't want to wait that long though. I want to live to see the die off happen during my lifetime.