There is a facebook post that says the entire population of the planet could live in 2000 square foot houses just in the state of Alaska.
Some research shows that there are roughly 1585682383 households on the planet. Alaska is 663,300 mi².
I dont think Im doing the math correctly..... households x 2000^2 Then converting that number to miles^2
$1$ mile is $5280$ feet. So 1 square mile is $5280^2 = 27,878,400$ square feet. If one house is $2000$ square feet, the you can have $27878400 / 2000 = 13939.2$ houses per square mile. So in $ 663,300$ square miles you can have $ 663,300 \cdot 13939.2 = 9,245,871,360$ houses.
This, of course assumes that you have no space between houses and that the terrain allows for houses all over.