@Jon_Kramer @kgMadee2 @tofugolem At a basic level, food is chemical energy, and the ultimate source of that energy is sunlight, captured by photosynthesizing plants. The plants are either eaten directly by us or by other animals that we then eat.
As such, given the total amount of energy the Earth receives from the Sun, it's possible to calculate the peak amount of people+animals the Earth can support. I haven't personally done this calculation, but I've seen rough estimates.