This is covered in the linked article: https://en.wikipedia.org/wiki/Carrying_capacity#Mathematics
Other variables to factor in would include cultural/esthetic ones: how much would a population tolerate a reduction in the idyllic/scenic nature of their landscape, merely to accommodate crops for a rising population?
(This is what I referred to as "quality of life" in another post.)
That math is about animals in a fixed climate who don't do trading. Swiss people do.
And that "how much would a population tolerate a reduction in the idyllic/scenic nature of their landscape" is a very arbitary factor that will strongly depend on who you ask.