NEO Settlement and Agriculture
Start with this claim in NearEarth Objects by Yeomans: 1000 NEOs larger than 1000 meters, 1e6 NEOs larger than 30 meters. Assume a power law of quantity versus size (assume spherical, a lousy assumption).
diameter 
radius 
cumulative 
area A 
volume 

> m 
m 
count 
hectare 
V m³ 

31.6 
15.8 
1000000 
0.314 
1.66e4 
from Yeomans 
100 
50 
100000 
3.14 
5.24e5 

316 
158 
10000 
31.4 
1.66e7 

1000 
500 
1000 
314 
5.24e8 
from Yeomans 
3160 
1580 
100 
3140 
1.66e10 

10000 
5000 
10 
31400 
5.24e11 

31600 
15800 
1 
314000 
1.66e13 
The quantity is the cumulative integer count of all objects larger than that radius (or area or volume). Assume a power law for the cumulative count versus area A in hectares: N(A) = 314000 hc /A, and dN/dA = n(A) = 314000 hc /A² = K₀/A², where K₀ = 314000 hc. Assume a minimum usable area of A₀ (perhaps 1/4 of 0.314 hc or 0.0785 hc) , and a maximum area A₁ for 314000 hectare for 1 large NEO asteroid.
Total area:
A_{tot} ~=~ {\Large \int_{A₀}^{A₁} } ~A ~n(A) ~dA ~=~ {\Large \int_{A₀}^{A₁} } ~K₀ / A ~dA ~=~ K₀ \ln( A₁ / A₀ ) ~=~ 314000 ~ \ln{ 400000 } ~=~ 4e6 ~ hc
Total volume:
A ~=~ 4 \pi r^2 ~~~~ r ~=~ \sqrt{ A / 4 \pi } ~~~~~~ V ~=~ 4 \pi r^3 / 3 ~=~ A^{3/2} / 6 ~ \sqrt{ \pi }
V_{tot} ~=~ {\Large \int_{A₀}^{A₁} } ~V ~n(A) ~dA ~=~{\Large \int_{A₀}^{A₁}} ( ~K₀ / A² ) ~A^{3/2} / 6 ~ \sqrt{ \pi } dA
V_{tot} ~=~ ( K₀ / 3 \sqrt{ \pi } ) ( \sqrt{A₁}  \sqrt{A₀} ) ~\approx~ ( K₀ / 3 ) ~ \sqrt{ A₁ / \pi } ~=~ 104720 ~ \sqrt{ 100000 } ~ hc^{3/2} ~=~ 3.31e7 ~hc^{3/2} ~=~ 3.31e13 ~m³
At an average density of 2000 kg/m³, that is 6.6e16 kg of near earth asteroid to play with.
Assume a cylindrical small habitat, 25 meters radius, 25 meters across, 6 RPM and 1 gee. Surface area is 2π*(25m)² = 3930m² = 0.97 acres; assume day/night cycle rotation of solar illumination and green photon recycling as red to produce the photosynthetic equivalent of 5 acres. Assume 4 meters of shielding, about 16000 m³ of asteroid material made into one habitat.
The agricultural area is fed with gossamerthin concentrating dichroic solar mirrors, which separate the photosynthesisactive portion of the solar spectrum (a band in the blue and another in the red) from the photosyntheticallyuseless green and infrared. The light is concentrated to 1360 W/m², but the black body radiative temperature of the habitat is arranged to radiate mostly towards deep space. Plant trays are rotated between daylight and darkness on a 24hour cycle ... or, whatever a particular plant species needs to maximize photosynthetic output. Much to be learned, but the system will have degrees of freedom that no terrestrial farm can duplicate.
There's enough material in the NEOs alone to build 2e9 acres of agricultural/living habitats, perhaps the agricultural production equivalent of 1e10 acres, and we haven't even got started on the rest of the asteroid belt, with vastly more material. Total world agricultural acreage is about 4e9 acres feeding 7 billion people; assuming a combination of better practices and better nutrition, we might be able to feed 20 billion people out there, in the NEOs alone.
For comparison, a hypothetical tentterraformed Mars has a Sunfacing area of 9e9 acres  at 45% of the solar intensity of Earth. The effective area is likely much less than that  in a very hostile radiation environment, with enough gravity to kill (falling, structural collapse) but not enough for longterm human health.
We will need to harvest water and other semivolatiles from comets and the outer/heavier asteroids (like Ceres). The limiting material may be nitrogen; the nitrates in the asteroids are probably not enough, and the planets big enough to collect ammonia are deep gravity wells, far away.