My off planet assumptions are for 200-300 years; that the Moon, asteroids, and free-floating colonies have been settled with lots of people; that Martian life discovery protects Mars from colonization; and that Venus hasn't yet been terraformed. And that there's no Singularity - otherwise all bets are off.* There's lots of room out there in space, and changing some of these assumptions make mine a low-end figure.
I think this is the good way to approach it if you're a space nerd who's deeply concerned about population growth and how little any side of the political spectrum has done to address it. We're not anti-human. Live long and prosper! Just as long as it's mostly out there, where you can't take the sky from me.
On planet Earth, we're messing up big time. What the global ideal population would be depends on trading off numbers against resource constraints. If we don't want resource constraints, want everyone to live like kings, and want minimal harm to the environment, then I think we're looking at 100 million people. If you settle for the median American quality of life with some reasonable technological upgrades to reduce environmental impacts, then we're looking at a billion people, one-tenth of what we'll see in 89 years. For larger numbers with modest environmental impacts, the only way I can imagine an ideal life is if people get most of the high quality of life experiences through virtual reality.
It's a rotten shame that the left in the US has mostly forgotten about the population problem due to some overstatements decades ago, and a fear of doing anything that tar them with espousing a policy that's also espoused for racist reasons by racists. The right is even worse, either ignoring the problem for ideological reasons or dog-whistling racist or fear-inducing reasons to control population. All the above gets magnified tenfold when discussing immigration to the US, where we convert the usually-young immigrants into highly impacting Americans, with descendants.
Maybe we can take the latest milestone of 7,000,000,000 people to do something about population, and even about immigration, without playing into the hands of racists.
*I think we'll pass the Singularity point in less than 50 years.