Almost anyone who has searched for a house recently knows there are not enough houses for sale.

One simple number defines the problem:

In October 2017, the nation had a 3.9-month supply of existing homes for resale. That means, at the pace seen then, it would have taken 3.9 months to sell all the homes on the market. A supply under six months puts home buyers at a disadvantage.

“Inventory is tighter than it appears. It’s much lower for entry-level buyers,” said Sam Khater, deputy chief economist for CoreLogic, a data provider for the real estate industry. He spoke at the Urban Institute’s annual housing finance symposium on Nov. 1.

Why don’t millennial, first-time buyers and Generation X move-up buyers have more to choose from? Who is responsible for the shortage of homes for sale and why? We’ve identified some suspects.

1. Boomers won’t move

More than three-quarters of baby boomers own their homes. For millennials to buy their first homes, and for homeowning Gen Xers to move up to their second home, boomers have to sell. But boomers are staying put.

Realtor.com conducted a survey this year that found that 85% of boomer homeowners planned to stay put over the next 12 months. “The reasons for that could be that they’re living longer, they’re living healthier and so staying in place is more possible for them,” says Danielle Hale, chief economist for Realtor.com.

“[Baby boomers] have been slower than previous generations to sell the family home, thus exacerbating the shortage of houses for sale,” concluded a Freddie Mac research report.

Also, thanks to rising home prices, would-be downsizers can’t find smaller homes that cost much less than their current homes, says Dennis Cisterna, chief executive officer of Investability Solutions, a real-estate investor marketplace. So they stay put. “There’s no urgency to sell right now unless you have to,” he says.

2. Landlords won’t sell

Millions of single-family homes were converted to rentals after the foreclosure crisis, Cisterna says. “Those investors have no incentive to sell,” he says. When a house goes up for sale, “now you’re competing not only with your neighbor who wants to buy that house, you’re also competing with investors.”

Renters made up 36% of households in the third quarter of 2017, up from 31% in 2005, according to the Census Bureau.

With greater demand for homes, but less supply, home values rise. Meanwhile, rents are rising faster than home prices. “Both of those factors would tend to encourage landlords to hold onto those homes and rent them out,” Hale says.

3. Owners are hooked on low mortgage rates

Over the last three years, the interest rate on outstanding mortgages averaged just 3.8%, according to the Department of Commerce. People savor their low mortgage rates and don’t want to give them up.

So as mortgage rates rise, homeowners tend to keep their homes a little longer, said Frank Nothaft, chief economist for CoreLogic, at the Urban Institute symposium.

“That means the inventory of homes for sale, which is already very low, is likely to remain that way if we see higher interest rates,” Nothaft said.

4. Builders ignore entry-level buyers

Through the first nine months of 2017, about 473,000 newly constructed houses were sold, according to the Census Bureau. Fifty-five percent of those homes cost $300,000 or more. “Of the new homes that we are building, the vast majority are move-up products,” Cisterna says. “They’re not for the entry-level buyer anymore.”

Builders counter that they pay $45,000 for a typical buildable lot nationally and around three times that in New England. And they say they face a shortage of skilled construction labor because experienced workers dropped out of the construction trades during the Great Recession, younger people aren’t replacing them, many job applicants can’t pass drug tests, and immigration enforcement is scaring some laborers away.

5. Regulations add costs

Homebuilders say regulations — including environmental protection, infrastructure fees and rules that specify minimum lot sizes — add tens of thousands of dollars to the cost of every home. Regulations account for about one-quarter of the cost of each home, said Michael Neal, assistant vice president for forecasting and analysis for the National Association of Home Builders.

A Freddie Mac report concurred. “Land-use regulations have become more burdensome” in the last 30 years, making it costlier to build, it said. Freddie Mac found that it takes just 3.5 months to get a building permit in lenient New Orleans, whereas it takes 17 months to get a building permit in restrictive Honolulu. A longer permitting process costs money as developers carry the investments on their books while awaiting permission to build.

6. Owners want to restrict supply

Local zoning and land-use regulations aren’t bestowed by a hidden hand. They’re enacted by officials who were elected by the people. When planning and zoning officials limit the number of houses that can be built in a neighborhood, or when they set minimum square footage for houses, they’re limiting the supply of homes and making them more expensive. They’re responding to constituents.

“There are regulations that are more about the neighbors’ sensibilities than they are about the safety of the people living in the houses,” says Miriam Axel-Lute, associate director of the National Housing Institute, a nonprofit that examines how social issues affect housing.

“It’s neighbors who want their property values to go up, in most cases, who are insistent upon some excess safety design standards or minimum lot sizes or other things,” she says. “They either want their property values to go up or they don’t want, quote, ‘the wrong sort of people’ in their neighborhoods. This is the pressure behind a lot of the most damaging regulations out there.”

How can home buyers respond?

Clearly, it will take time and concerted effort to fix the problem of not enough houses for sale. Meantime, there are things home buyers can do:

Be realistic about how long it will take to find and buy a home. Real-estate agents can provide an estimate, based on market conditions.

Save plenty of money for a down payment and reserves.

Improve your credit score to get a good mortgage deal.

Be ready to make a competitive offer when a suitable home comes on the market.

That advice works for any real-estate market, whether it favors sellers or buyers. But these tips are especially appropriate when inventory is low.