How much does it cost to build affordable housing?

The cost of affordable housing: Does it pencil out?
Can anyone build affordable housing without public money?

This pretty impressive web tool from the Urban Institute shows how difficult it is to make larger affordable housing projects pencil out.  This is one reason why encouraging missing middle housing, and particularly secondary dwelling units, can help greatly with affordable housing.  In addition, figuring out how to provide incentives to those who build larger affordable developments is also important.  While it may not pencil out build a hundred unit apartment complex, the math works a lot better if one is attempting to build a single unit on a lot they already own. Greater Greater Washington provides some additional analysis.

It turns out building affordable housing is not particularly affordable. In fact, there is a huge gap between what these buildings cost to construct and maintain and the rents most people can pay. Without the help of too-scarce government subsidies for creating, preserving, and operating affordable apartments, building these homes is often impossible.
— Urban Institute