A chart accompanying an article on real estate tax shelters yesterday incorrectly identified as "revenue losses" the "tax losses" by real estate partnerships in 1965, 1975 and 1983.

When President Reagan unveiled his plan to revamp the federal tax system, no industry groaned with more feeling than real estate. Every section of the tax code that for decades has nourished real estate appeared under siege, along with tens of billions of dollars in tax breaks a year.

But while the industry's public face was grim, a bullish picture soon emerged in the offices of its tax lawyers, those aficionados of fine print known for charting end runs around unfriendly laws.

"Even if the proposals were adopted 'as is,' it is more probable than not that approaches would be found to structure around them," said a brochure for clients of Fine & Ambrogne, a Boston firm known for its real estate expertise. " . . . As we have learned in the past, once the purported reforms take final legislative form, there are usually ways of dealing with them and retaining most of the tax benefits from real estate."

The words bespoke the supreme self-confidence of an industry that more obviously than others has shaped the federal tax system to its own ends -- using legendary clout to fend off congressional assaults, or, when that has failed, employing tireless accounting ingenuity to foil offending provisions.

"When it comes to taxes, there is honey in real estate," said former senior Treasury Department official William S. McKee, now a tax lawyer representing real estate interests. "The only question is who gets the honey and how do they get it out. And I can guarantee you that people in my profession get paid enormous amounts of money to make sure those benefits are not lost."

Since the dawn of taxation, Congress has so favored real estate that buildings have become double shelters -- one from the elements, another from taxes.

No industry better illustrates how the federal tax system favors certain activities over others, determining how tens of millions of people and thousands of companies spend their money, in the process shaping the American landscape.

In 1983 alone, the latest period for which data is available, real estate partnerships "sheltered" $29.5 billion in income that otherwise would have been taxed, according to the Internal Revenue Service. That is, owners of buildings had so many tax deductions that they reported losses on their tax returns even as they made money, canceling out or "sheltering" other income from the tax collector.

According to Reagan, the lure of tax shelter, greatly enhanced by his 1981 tax program, draws investment to real estate that could be more productive elsewhere -- in high-tech firms that get fewer tax breaks. As evidence, he has pointed to overbuilt office markets in cities across the country.

As with all deductions, real estate breaks favor the rich. Those in the 50 percent bracket save 50 cents in taxes for every $1 written off; those in the 25 percent bracket save half as much. The result is that wealthy Americans get benefits from the Treasury that others underwrite with higher tax rates.

The circumstances have created an anomaly in the business world: Many real estate executives actually like high individual tax rates. With lower rates, wealthy Americans would seek less shelter and might put their money elsewhere, they say. Said Washington investment adviser Alexandra Armstrong: "They could do as well in municipal bonds. It just wouldn't be as much fun."

The bottom line, according to Treasury and congressional analysts, is that the tax system pays out more in deductions to real estate investors than they pay in taxes. This fact moved Senate Majority Leader Robert J. Dole (R-Kan.), as Finance Committee chairman in 1984, to deliver a bizarre threat to real estate lobbyists fighting his tax proposals:

"Maybe we ought to exempt real estate from the tax code altogether," Dole was quoted as saying. "No taxes, and no deductions either. The revenue estimators tell me that would raise $15 billion by 1987." Retelling the story later, Dole quipped: "Three real estate guys fainted in the back of the room."

Today, facing proposals by Reagan and House Ways and Means Committee Chairman Dan Rostenkowski (D-Ill.) to close their most cherished loopholes, many real estate executives say they would gladly pay more taxes, if they could just preserve the incentives luring investors to their projects.

They liken their tax benefits to subsidies, much like farm subsidies except delivered through the tax system. They generally concede that this distorts economic choices, but they insist that the benefits have traveled through the economy, into affordable homes, offices, apartments, shopping centers and factories. As such, they say, the entire country is "hooked" on the system.

"The needle went into the industry's vein many years ago," said Phil Padgett of Bethesda-based Oxford Development Corp. "Unless you want to send this country into shock, you better think about how fast you pull the needle out."

One of the key tax advantages for commercial real estate came into being 31 years ago, and according to several present at the creation, Congress had no idea what it was setting in motion. The First Big Break

The year was 1954. The country was in a recession. American manufacturers were losing ground to competitors in Europe. Hoping to spur companies to modernize, President Dwight D. Eisenhower proposed a system of accelerated depreciation, allowing investors to deduct the cost of new machines much faster than they wore out. That is: Treasury would subsidize purchases of machines by deferring taxes for those who bought them.

Several who witnessed the congressional debates recall that buildings were scarcely mentioned, and got included almost by accident.

"The focus of the discussion in those days was on machinery and equipment," said Gerard Brannon, a former Joint Committee on Taxation official who worked on the legislation. "The model everyone used was an automobile -- the idea that a new car goes down rapidly in value as soon as you drive it out of the shop.

"It should have been evident that a very long-lived asset, like a building, decreases in value very little in the early years," Brannon said. "But I don't recall any serious suggestion to draw a line between buildings and other assets."

So began the system of deducting the cost of buildings much faster than they actually depreciate, resulting in a generous "tax subsidy" for those who buy them. The subsidy has grown considerably. Using regular depreciation, investors today write off buildings in 19 years, one-nineteenth of the cost each year, although they generally last as long as 50 years.

One result has been a vast expansion of office construction in the last generation.

"What we wanted was a spurt in plant construction, not office buildings," said former House Ways and Means chairman Wilbur Mills (D-Ark.). "I don't think anybody anticipated by any means what would happen to commercial real estate, nor did we anticipate its use as a shelter. That we never intended and that has been a very bad thing."

But Mills said there was no move to change the system once it was in place.

"The real estate industry has got a lot of influence in the Congress," he explained. "They can make an awful sad story: If you don't do this, we're gonna go broke; if you do that, we'll go broke. And sometimes the Congress believes them. The Congress doesn't want to ruin the economy." Sweetening the Investment

The "honey" in real estate derives from the fact that owners of buildings often deduct more on their tax returns than they make on their investment, generating "paper losses" even as their property becomes more valuable. Tax losses by partnerships owning real estate totaled $23 billion in 1982 and $29.5 billion in 1983, according to the IRS.

This results from combining large depreciation allowances for buildings, with even bigger deductions for interest payments on loans. Interest deductions are large because buildings carry bigger loans than most other assets -- up to 85 percent of the price. The bigger the mortgage, the more interest is deducted.

A hidden ingredient making the whole package even sweeter is a benefit unique to real estate allowing investors, for tax purposes, to "lose" more money than they have paid in -- more even than they would lose if the building collapsed.

Like accelerated depreciation, this benefit evolved haphazardly, dating to a 1947 Supreme Court ruling involving a widow named Beulah Crane.

The ruling established that taxpayers could make a relatively small down payment on an asset, take out a large loan to cover the difference, and proceed to claim depreciation on the full price.

That is: an investor pays $100,000 cash on a $1 million building and takes out a $900,000 loan at 10 percent interest. He claims depreciation allowances on the entire $1 million value, rather than on the amount he has chipped in, deducting $55,000 in the first year. He also deducts $90,000 of interest, for total "losses" of $145,000, or almost one and a half times his down payment.

Congress outlawed this practice for most investments in 1976 and 1978 by creating what is known in the obfuscated lingo of the tax code as the "at risk" rule. It requires taxpayers to observe what seems a basic law of economics: No one can lose more than the amount for which he is liable, or "at risk"; to take large deductions, taxpayers had to be "at risk" for large amounts.

But the laws of economics do not always govern real estate or the tax code. And real estate was the lone activity exempted from the rule.

The reason for the exception, according to industry lawyers, is that real estate has unique finances. Lenders generally make large loans with only a building as collateral, not requiring developers to put their own assets "at risk." If it satisfies lenders, it should satisfy the tax system, they say.

Many developers say they need large tax write-offs to subsidize the early, cash-strapped stages of a project, and could not put up the extra assets that an at-risk rule would impose as the price of those benefits.

However, the Carter administration's reasoning was not nearly so subtle when it agreed in 1978 to exempt real estate from the at-risk rule.

"Mainly it was muscle," recalled Donald Lubick, assistant Treasury secretary at the time. "We felt we couldn't get it through Congress."

The final favor for real estate comes at the exit: When a building is sold, the profit is taxed as a capital gain, at a maximum rate of 20 percent, rather than at the full tax rate.

Thanks to this panoply of tax favors, real estate developers frequently have more tax deductions than they can use. Rather than let them go to waste, an entire industry has come to flower by using accounting and legal devices to "sell" these unneeded tax benefits to high-bracket taxpayers seeking shelter.

So-called real estate syndicators have structured tens of thousands of such "shelters" around office buildings, apartments and shopping malls, with the blessing of the federal tax code. They divide buildings into shares, carrying both tax and economic benefits, and sell them to investors. Virtually every Wall Street brokerage house now deals in such shelters.

"When you're syndicating a building, you sit down and say: 'Okay guys, how are we going to cut this one up?' " said a real estate tax lawyer who asked not to be named. "Say you're a pension fund, which is tax exempt. You can sell it to a partnership of doctors in the 50-percent bracket, and they'll pay for the building and the tax benefits, because both of them have value.

"The pension fund gets tax-free income, the doctors get tax deductions and a building. The only loser is the federal Treasury, which has to pay the difference."

The market for these shelters soared after 1981, when Reagan's tax bill shortened the depreciation period for buildings to 15 years.

But the 1984 Deficit Reduction Act curtailed some benefits and this year, with the prospect of lower individual rates from tax-overhaul, the market for shelters has leveled off. If deductions once worth 50 cents on the dollar suddenly dropped to 35 (Reagan has called for a top rate of 35 percent), shelters would become less valuable.

However, as the odds for passage of a 1985 tax bill fell last month, some brokers began pushing what one called "last chance for deep shelter in real estate" deals.

One shelter, structured by the syndicator Integrated Resources around 11 existing apartment complexes in Pennsylvania, New Jersey and Maryland, promotes 1985 "losses" of $14,852 for a payment of $1,500. The deal relies on "grandfathered" tax benefits outlawed in the 1984 Act. Reformers' Whipping Boy

Many decades of favoritism have now made real estate the whipping boy of everyone from Reagan on down who argues that the tax system is distorted. Even the National Realty Committee has conceded that the industry could afford to pay more taxes. The question is where to draw the line.

Proposals by Reagan and Rostenkowski would roll back the industry's most cherished advantages: restricting deductions for depreciation and interest, abolishing the at-risk exception and taxing sales of buildings at the full rate, rather than as a capital gain.

The realty committee called this overkill.

"I think most of us in the industry feel we ought to pay our fair share," said committee Chairman J. McDonald Williams, president of Dallas-based Trammell Crow Co. ". . . But this bill is patently, unapologetically anti-real estate."

The group released a study saying that the changes proposed by Rostenkowski would so erode profits that rents in a new building would have to rise as much as 35 percent to cover the difference. The flip side of this finding is that the present tax system subsidizes rent for tenants in new office buildings by 35 percent. And even some developers said that is too much.

"There's no reason we ought to subsidize the rent of IBM or any other tenant just because people are putting up money in return for the opportunity not to pay taxes," said John Akridge, a prominent Washington office developer. "The bottom line is we all pay for it, in higher tax rates."

Akridge said that major developers, who look primarily for economic value in buildings rather than tax breaks, could weather a transition to a more neutral tax system, and would likely be better off if tax-motivated competitors fell by the wayside.

With the overhaul movement still in its early stages, it is far from clear that major change will occur. But even if it does, the industry's accountants and tax lawyers likely will be ready for it.

Unless depreciation benefits are greatly curtailed, McKee said, real estate still will have plenty of "honey" for tax purposes. He emphasized, for example, that some limits on write-offs would not apply to wealthy taxpayers with large amounts of income from stocks, bonds or other investments.

"Maybe the middle-class guy will be cut out, but the wealthy guy, the guy who can pay my fee, will still be able to make money because I'm going to figure out a way for him to do it," McKee said. "If the subsidy is still there, then you've still got honey. And the only thing you've changed is which bees get at it."