For decades, the tax code has been filled with rewards for homeownership. Tax breaks encourage people to get into first homes and to trade up as they get older, building a national mind-set that you're never quite middle class until you've qualified for a mortgage.

It amounts to a vast social engineering project that assumes society is better off with owners instead of renters. But the tax bill making its way toward final passage is upending that premise.

The bill will increase many homeowners' monthly housing costs by scaling back deductions that allow them to reduce mortgage interest and property taxes. And by roughly doubling the standard deduction, it reduces the incentive to buy homes by making far fewer homeowners eligible for preferential tax treatment.

Today, a little under half of American homes are worth enough to justify itemizing mortgage interest and property taxes. Under the tax legislation, that figure would fall to close to 14 percent, according to an analysis of the plan by the online real estate marketplace Zillow.

The Republican plan, in short, is tinkering with subsidies so entrenched in the social fabric that they have become entitlements in all but name.

"It suggests a limit in the federal government's willingness to subsidize ownership," said Edward Glaeser, an economist at Harvard. "It's also a reflection of just how expensive housing has become, and how it feels problematic to be using the tax code to support people buying houses that are this expensive or, even worse, to be encouraging housing prices to rise further."

Both parties have long championed homeownership as a way to help people build wealth and keep neighborhoods more stable. But economists like Mr. Glaeser have been critical of the resulting subsidies.

In their view, the government has made homeownership and its financing artificially cheap through the tax code and mortgage backers like Fannie Mae. As a result, people are encouraged to take on more debt than they might otherwise — to buy bigger homes and second homes, and to plow the equity they accrue into renovations and personal spending.

This distorts the economy in a number of ways. For starters, it's unfair: Since the benefits of these deductions get bigger with larger and more expensive homes, the bulk of the benefits accrue to wealthier homeowners in pricier markets. This alters the landscape by encouraging more single-family homes and suburban sprawl. That, in turn, prompts the government to spend more on roads and infrastructure and makes housing a bigger portion of the economy than it would be in the absence of federal help.

Construction, though, is one of the least productive industries. By funneling more of the national debt and savings into construction, the government is hindering sectors, like education and manufacturing, that have a bigger economic payoff.

All this has made homeowner subsidies, in particular the mortgage interest deduction, one of the rare tax breaks with critics across the political spectrum. Matthew Desmond, a Princeton sociologist who studies how eviction wreaks havoc on the lives on the poor, has documented how the deduction became the "engine of American inequality" because it favors higher-income homeowners.

Edward J. Pinto, co-director of the conservative American Enterprise Institute's Center for Housing Markets and Finance, has described the interest deduction and other homeowner subsidies as a wasteful giveaway that inflates home prices and encourages people to borrow excessively.

"My basic view is if you subsidize something you'll get more of it, and as a country we've been subsidizing debt," he said.

Jeff Neubauer is already thinking more conservatively. Mr. Neubauer, 34, who helps manage his family's electrical contracting business and lives in Rancho Santa Margarita, Calif., is looking to trade up from his two-bedroom condominium to a larger home in the $800,000-to-$900,000 range. Now, he is worried that the cost of ownership will be much higher and will rather play it safe until the effects of the bill are clearer.

"It makes me want to not spend as much money," he said.

Though it's considered sacrosanct today, the mortgage interest deduction was created almost by accident in 1913. When Congress passed the first income tax, it made interest deductible, a provision intended to help farmers and other businesses deduct their financing expenses. Over the next century, as the government began guaranteeing mortgages and as the construction of single-family homes became a global industry, the mortgage interest deduction ballooned into one of the largest tax subsidies, accounting for more than $70 billion a year.

The size of the deduction made it a tempting target for Republicans. To stay within legislative boundaries, the Republicans need to limit the budget consequences of tax cuts largely benefiting corporations and the wealthy. Reducing housing deductions — benefits that disproportionately flow to homeowners in wealthier Democratic cities — helps recover some revenues while concentrating the impact on relatively few people, most of whom are unlikely to vote for Republicans.

The bill does retain significant subsidies, allowing home buyers to deduct interest on mortgages as high as $750,000 — accounting for the vast majority — and up to $10,000 total in property taxes and state and local income taxes. But real estate agents have portrayed the changes as a full-blown attack on their industry.

"The final tax reform bill released punishes homeowners and weakens homeownership," the California Association of Realtors said in a statement issued on Friday, "and in fact, it looks at homeowners and the housing market as nothing more than a piggy bank."

Earlier versions of the bill prompted real estate agents in Bakersfield, Calif., to protest and chant "Save Homeownership" in front of the local office of Representative Kevin McCarthy, the House majority leader. And the provisions affecting homeownership were among the few main sticking points among House Republicans, particularly those from Mr. McCarthy's state.

According to some estimates, the modification of the mortgage interest deduction, combined with the steep drop in the deduction for state and local property taxes, could lead to home price declines of as much as 10 percent in counties with the highest property and income taxes.

It is, of course, hard to gauge the long-term ramifications of a tax bill that is flying through Congress in hopes of allowing Republicans and the Trump administration to claim a major legislative victory.

That uncertainty is leading to major confusion for home shoppers like Morgan Molnar. Ms. Molnar, a 29-year-old who works in product marketing, lives in the Silicon Valley city of Sunnyvale and is looking for a home costing $1 million to $1.2 million. She and her husband have been approved for a mortgage and were ready to make offers, but are now feeling hesitant.

Better to push forward because the Bay Area's already-low inventory is going to shrink? Or will reduced tax deductions lower prices by reducing the number of people who can afford homes?

"You're leaning forward but afraid to make that leap because of the situation," she said.

One thing that seems certain is that the lack of inventory already plaguing the housing market will get worse. By allowing homeowners already benefiting from the existing mortgage interest deduction cap to keep it, the bill is likely to encourage people to stay in place a bit longer.

The plan could also affect consumer spending. Over the past two decades, homeowners have become accustomed to using steadily rising home prices to periodically refinance their mortgages so that they can take money out of their homes and spend it on everything from renovations to college tuition and vacations.

These "cash-out refinancings" were widely abused before the housing crisis — the proverbial "people using their homes as A.T.M.s." It has been less of a problem since the crisis. Today, some 42 million homeowners have about $5.35 trillion in home equity that they could hypothetically tap into, according to Black Knight, a software and data provider to the mortgage industry. This assumes they don't borrow more than 80 percent of the value of their home.

Whatever happens, it has led to a chaotic end of the year for real estate agents. Kalena Masching, a Silicon Valley agent for Redfin, a real estate brokerage based in Seattle, has one group of clients trying to push sales through before any tax changes take effect. Another group is holding off to see how the loss of homeowner deductions ends up changing the math of buying a home.

"There's an overwhelming sense of people being upset and a lot of uncertainty, and mostly feeling like it's not a good thing," she said.