The United States is facing an affordable housing crisis.

It’s affecting Americans across the income spectrum. The National Low Income Housing Coalition found in 2018 that a renter working 40 hours a week and earning minimum wage can afford a typical two-bedroom apartment (i.e., not be cost-burdened) in exactly zero counties nationwide.

Harvard researchers found that in 2016, nearly half of renters were cost-burdened (defined as spending 30 percent or more of their income on rent). Even some high-income earners in expensive coastal cities struggle with rent. Nearly two-thirds of renters nationwide say they can’t afford to buy a home, and saving for that down payment isn’t going to get easier anytime soon: Home prices are rising at twice the rate of wage growth.

Even as the economy continues to grow and the housing market rebounds from the Great Recession, Americans face widening inequality, and, for many, an inability to comfortably pay for housing as wage growth stagnates and housing costs continue to climb.

With supply shortages across the country, the simple answer to the rent being “too damn high” is, of course, to build more housing. But the reality is significantly more complicated than simply jump-starting construction. A variety of market forces, policy decisions, and demographic changes have converged to make building affordable housing a difficult, and politically fraught, proposition.

How did a nation that prides itself on opportunity become one in which a shortage of affordable housing options seems to have no immediate solution and where so many renters and buyers struggle?

Here are the main factors driving up the cost of housing.

Affordable housing policy favors homeowners over renters—and our tax deductions prove it

In 1965, the U.S. Department of Housing and Urban Development (HUD) became a cabinet-level agency. The Johnson administration used the department to implement a vision of America in which federal welfare programs combated poverty—partly through housing subsidy programs—and the impacts of racial injustice; enthusiasm among progressive activists abounded.

But this new vision didn’t carry over to Johnson’s successors. The Nixon administration put a moratorium on the construction of public housing. Moves by the Reagan and Clinton administrations essentially resulted in public housing only being built to replace existing units. The Reagan administration drastically cut HUD’s rental assistance programs, which advocates for affordable housing claim made homelessness a permanent fixture of American life.

Meanwhile, the federal government consistently subsidizes middle- and upper-middle-class homeowners.

Take, for instance, the mortgage-interest deduction (MID), which was established in 1913, along with the federal income tax, and has survived numerous updates to tax law thanks to the powerful real estate lobby. The MID lets homeowners deduct interest payments on a mortgage from their federal income taxes.

While the tax law passed in 2020 lowered the MID cap from $1 million to $750,000, and thus how much it will cost the federal government, the Congressional Joint Committee on Taxation predicts that in 2020 the MID will save homeowners (and cost the federal government) $30.2 billion in lost revenue. This annual federal tax expenditure is more than the funding of all rental subsidies and public housing, and benefits mostly middle-class and wealthy homeowners because renters don’t benefit at all and the more expensive a home is the more the owner benefits.

The nation also has a long history of redlining, segregation, and racist housing policy that has created incredible gaps in the access people of color have to affordable housing options and homeownership, and this has stifled household wealth creation in those communities. A 2018 Brookings Institution and Gallup study also found that even as black Americans face more hurdles on the road to homeownership, they may consistently find their investments in residential property undervalued:

These findings highlight the consequences of orienting U.S. housing policy to favor homeownership and champion the single-family home as an instrument of wealth creation and family stability. Combined with a history of racist and exclusionary policies, including redlining and housing covenants, this policy choice has created a gap in homeownership between white and black Americans, locking black families out of a significant source of long-term wealth creation.

Rising costs of labor and materials mean affordable housing is expensive to build

Home builders, like any manufacturer, charge a premium on top of the base cost of their labor and of raw materials. The Bureau of Labor Statistics tracks the price of such raw materials with its producer price index, which has risen 23.9 percent since the 2008 financial crisis; while the index has fluctuated some in the last year, it remains at elevated levels.

The price of lumber alone has fluctuated wildly in recent years, at times reaching more than twice its cost n 2008, according to a monthly lumber price index from Random Lengths. Lumber can represent anywhere from 5 to 10 percent of the cost of building a home, and the rise in lumber prices is in part a result of a decades-long trade dispute between the United States and Canada. A third of the lumber used in residential construction comes from our northern neighbors, and that supply has been devastated by mountain pine beetles, which can kill a tree within 48 hours, and by wildfires.

Another factor is the increased price of undeveloped land in and around urban centers, where work is concentrated and demand is high. Many home builders and developers have focused on the high-end (and higher profit margin) luxury housing market, which means home builders are constructing fewer entry-level and starter homes. When such starter homes are built, their prices are ultimately bid up because demand far exceeds supply.

While the rebounding housing market has meant more housing starts and more apartment buildings breaking ground, a persistent labor shortage is driving up costs and cutting into margins for these projects, adding to significant economic pressure for developers to focus on luxury units, which can turn a higher profit.

According to a 2018 survey by the National Association of Home Builders, 85 percent of the organization’s members believe the cost and availability of labor is their biggest issue, even with the industry adding roughly 12,000 new construction jobs per month in 2019, per the Bureau of Labor Statistics. This leads to competitive bidding for specialists like home framers, electricians, plumbers, masons, carpenters, and HVAC installers.

Construction has always been a boom-and-bust industry, but the sector never fully recovered from the Great Recession. Factors like persistently low unemployment, efforts to ramp up deportations and curtail immigration (immigrants make up 25 percent of the sector’s workforce), and the construction industry’s growth over the last few years have converged to keep contractors and developers from getting ahead of rising demand.

Major natural disasters and storms don’t help, either: Hurricanes Irma and Harvey each created increased regional demand for home builders. In the spring of 2019, nearly 250,000 construction jobs remained unfilled across the country. According to a BuildZoom analysis, the job market is tightest in high-cost markets, which generally have the greatest need for affordable housing.

In the long term, members of the industry worry about a pipeline problem: The average age of those in the building trades hovers in the mid-40s, and many industry and union leaders are struggling to attract younger workers and potential apprentices to job training programs.

Affordable housing suffers from a national “not in my backyard” problem

Restrictive zoning codes are often an effective tool in the fight against new construction and, frequently, densification, helping to suppress housing supply even as demand rises. Whether by limiting the height of new buildings or deciding that large apartment buildings need a minimum number of parking spots, these restrictions make construction more difficult and more expensive. California cities like Los Angeles and San Francisco are known for impeding new construction through these methods, which has helped lead to the state’s severe housing shortage.

The rapid rise of these types of regulations—and the corresponding “not in my backyard,” or “NIMBY,” sentiments among residents and landowners—has increased property values, added to the cost of housing, and made it harder for workers to chase opportunity by moving into fast-growing areas with high concentrations of open jobs. Though it’s great for current homeowners, who see the value of their houses rise thanks to a lack of supply, such restrictive practices hurt the wider economy.

An Obama administration proposal to cut back on such regulations summarized the situation well:

Too many of the communities with the most dynamic growth have pulled up those ladders behind them — often unintentionally — by creating conditions that make it impossible for families to find affordable housing in the same communities where they can find jobs.

Efforts advanced by pro-development, or YIMBY (“yes in my backyard”), groups to push back against these rules include streamlining permitting processes, eliminating parking requirements (which add to the cost of new construction), encouraging transit-oriented developments, and changing zoning laws to allow for more high-density projects. Inclusionary zoning policies, which require developers to include a certain number of affordable units within a larger market-rate development, have also been enacted in cities like New York.

Ultimately, advocates across the political spectrum feel local control in some cities only entrenches established power, and that state and federal governments should promote more policies that create affordable housing. As the YIMBY movement has gained momentum, upzoning legislation has passed in Oregon and Seattle, and a number of other cities and states are considering similar measures.

Affordable housing is a transportation issue, too

The “affordability” of housing isn’t all about the housing itself: As rising rents and home prices push low- and middle-income households farther from major urban centers—where the greatest number of jobs and the most robust public transit systems tend to be—lower housing costs in suburbs and exurbs get offset by increased spending on transportation.

Much of this sprawl can be attributed to zoning choices made at the city level that have created expensive downtown business districts. This means middle-class workers living outside of the city center must rely on inconsistent public transit systems or long car commutes. A 2016 Brookings Institution study found that communities of color and high-poverty neighborhoods saw the highest decline in job proximity between 2000 and 2012.

Take, for example, Phoenix, Arizona, a city characterized by sprawl and lack of a strong public transit system. Phoenix residents across income brackets spend nearly 50 percent of their earnings on housing and transportation.

In other words, there’s more to consider than just the rent. A report from Harvard’s Joint Center on Housing Studies examined household expenditures at varying income levels and showed that as housing costs decreased, the share of income spent on transportation increased by up to five times.

And that’s not to mention increased time spent commuting to and from work, which eats into leisure and sleep. Among the working poor, who already feel burdened by an ever-growing affordability crisis and stagnant wages, this can be a tradeoff that’s hard to stomach.

Transit access underscores how the affordability crisis, and the increasing distance between affordable homes and good jobs, warps so many aspects of how and where we live. As with public policy and labor and materials shortages, transportation is another aspect of this multifaceted crisis and will need to be taken into account in the hunt for a lasting solution.