The earth can sustain much more than that, we even have the beginnings of the technology needed for that now. Indoor farming can produce the needed food, providing we can produce enough energy - which requires a lot of renewables and some breakthroughs in nuclear fission and fusion. Desalinization can produce the water, with the same energy requirements. In the end everything is an energy problem, which is why nuclear fusion is so exciting.
We're actually limited not by space, water, or arable land, but by thermodynamics. At some point we'd overheat the planet directly from our own waste heat. We have to get off the planet to continue growing the population.
Once we do that the limits on human population are so high as to be mind boggling.