Millions of Americans can no longer dream of buying a home. Rental apartments are also unaffordable. Why? Here's everything you need to know:

What's gone wrong?
From cities to suburbs to rural America, the cost of housing has far outpaced increases in salaries. Home prices are growing at twice the rate of wages, and there are fewer houses on the market than in any year since 1982. The single-family house, with a garage and a front lawn, remains a bedrock of the American dream, even as it recedes from many people's reach. Young adults are one-third less likely to be homeowners than the previous generation was at the same age, and nearly two-thirds of renters say they can't afford a house. The median single-family house costs about $280,000, with demand driving prices at the lower end of the market to rise twice as fast as those of high-end homes. Once the backbone of U.S. wealth, housing has become a civic, economic, and environmental catastrophe.

Is renting any better?
It's even worse. Nearly half of renters are cost-­burdened — ­meaning they spend at least 30 percent of their income on rent. Since 1960, renters' average earnings have increased 5 percent as rents have jumped 61 percent. Eleven million Americans spend more than half of their paycheck on rent. They have little choice: After 2011, more than 4 million units renting for $800 or less per month disappeared nationwide. In trendy cities like Seattle and Austin, older, multifamily buildings are being demolished or converted into condominiums and co-ops. A minuscule percentage of new apartments are low-rent. Today, a full-time minimum-wage worker can afford a two-bedroom rental in precisely zero U.S. counties; on average, it would take clocking 127 hours a week at the federal minimum wage to make paying for one possible.

Are expectations too high?
After World War II, home ownership went from a luxurious status symbol to a national priority. "A nation of homeowners, of people who own a real share in their own land, is unconquerable," President Franklin Roosevelt said in 1942. Zoning changes helped create the suburbs, as did improved cars and new roads, enabling people to live farther from work. Mortgage markets developed, and the rate of homeownership grew from 43 percent in 1940 to 66 percent by 2000. The size of houses per resident also doubled in that period. It became conventional wisdom to borrow as much as possible, buy the biggest house attainable, and hold on as the property steadily grew in value. But that's no longer feasible for many ­people: In 1990, 18 months of the median local salary could buy a house in 72 of America's 100 largest cities, Harvard University found. Now that's possible in just 25 of them.

What's jacking up costs?
Demand, above all. Houses are supposed to pass between generations, but Baby Boomers are living longer and staying put. People are also moving less than ever, down to 10 percent of the population annually. After the recession, private-equity firms and hedge funds spent an estimated $36 billion on more than 200,000 homes in ailing markets, and their strategy was to evict current residents and target the ultrawealthy. In New York City, homeless shelters have been filling at the same time towering new luxury condos rise into the skyline. Since 2011, the average cost of a New York condo rocketed from $1.15 million to $3.77 million. Even more perversely, nearly half of Manhattan's new luxury condos are empty.

Why not build more housing?
The cost of land and building materials such as timber and steel keeps climbing, and there are major shortages of construction workers. That makes it financially unfeasible to build low-­income housing. In San Fran­cisco, where the median one-­bedroom rental goes for $3,700 per month, it costs $700,000 to build a single new apartment unit. "In a lot of cities, the market can't supply housing for people making less than six figures," said James ­Mad­den, a ­Seattle-based ­affordable-housing developer. Even when developers do seek to build dense rental or condo units with affordable prices, they run into NIMBY — the "not in my back yard" attitude of existing residents who insist that new construction and new residents will disrupt their views, schools, parking, and property values.

Can NIMBY be defeated?
Government initiatives can only achieve so much without current homeowners making concessions. California is plagued by crippling housing costs and widespread homelessness, but recently the legislature narrowly failed to pass a law that would have overridden local zoning rules to allow high-density housing. NIMBY is on vivid display in Lafayette, Calif., a wealthy town of 25,000 outside San Francisco. Gov. Gavin Newsom has said the state must build 3.5 million homes by 2025 to ease the affordability crisis, yet Lafayette residents were outraged by a proposal to build 315 new apartment units near a commuter train station. When developers and the city manager, Steve Falk, agreed to a compromise of 44 single-family homes on the site, residents went to court to fight that too. Falk resigned, saying he couldn't oppose such a modest plan amid a massive housing crisis. "My conscience," Falk said, "won't allow it."

The racial gap in home ownership
Scarce housing is behind a surprising number of social problems. Transportation accounts for about one-third of U.S. carbon dioxide emissions, and much of that is due to obscene commuting times in cities and suburbs with inadequate mass transit. (Four million Americans spend at least three hours every day driving to and from work.) There's a substantial racial gap among homeowners, with black and Hispanic Americans more than 25 percent less likely to own a home than whites. That gap, which is at least partly caused by redlining and racist lending policies, reinforces racial wealth disparities and impedes social mobility. The poor of all races are most affected by housing shortages and costs; by one estimate, there are now only 37 available affordable units for every 100 extremely poor households. In California, state lawmakers have allowed homeowners to convert garages into residential spaces and build small homes in their backyards, known as granny flats or casitas, that they can rent out. Ben Metcalf, the state's former director of Housing and Community Development, compares renting out parts of your property to growing "victory gardens" during World War II food shortages. "Your civic duty as a Californian," he said, "is you've got to convert your garage."

This article was first published in the latest issue of The Week magazine. If you want to read more like it, try the magazine for a month here.