Mortgage rates, which have reached record peaks in recent months, are among the prime enemies of the real estate industry.

But the effect on home buyers -- particularly those in the upper tax brackets -- are not necessarily as devastating as they may seem. For instance, a household with a taxable income of more than $48,000 is in the 49 percent tax bracket. If that household has an 18 percent morgatage loan, the after-tax cost of that mortgage has been computed at only 9.2 percent.

On the other hand, that same household would be paying an after-tax interest rate of only 5.1 percent if the mortgage interest rate had been 10 percent, as it was only two years ago. A jump of 8 percentage points in mortgaging rates is really only an increase of 491 percent points to a home buyer in a high-income bracket.

The Milwaukee-based Mortgage Guaranty Insurance Corp. calculates that an average couple with a gross income of $18,000 securing a 30-year-loan at 16 percent would be paying an after-tax (or net) interest rate of 12.72 percent. However, if that couple had a gross income of $50,000, the after-tax interest cost would be only 9.09 percent.

This illustration is based on a couple with two children filing a joint return with all income from wages and $3,400 of itemized deductions other than mortgage and other interest. Individual tax situations would vary slightly.

Of course, the difficulty is making the big down payment (usually at least 20 percent) needed to buy an expensive house and then being able to make the monthly payments for principal, interest, taxes and insurance. Yet, if you can swing it, the tax advantages may be worthwhile.

An actual example is a real estate broker in Northern Virginia, who asked not to be named. He and his wife are having a custom $200,000 house built on a $50,000 lot that they already own. They currently live in a $150,000 house on which they have an 8 1/2 percent mortgage. Their equity in the present house is about $70,000.

Because this couple is in the 50 percent tax bracket, they are not highly concerned about whether the permanent loan on the new house is made at 14 percent or more. Their main concern now, because of mortgage market conditions, is to get a permanent loan. The house is being built with a 12 percent construction loan, which is well below market today.

The broker said that he has eligibility for a VA loan and also feels fairly certain of getting a conventional loan if it is needed. But he sees the higher mortgage on the new house, likely to be about $150,000 as worth the cost.

"Our main interest is in having the new place as the house of our dreams," he said. "But it will also provide more tax shelter, which we can use. Also, I have confidence that residential real estate is a good investment and that the house will appreciate in value more annually than we will be actually paying in additional net interest charges. Next year, it would cost more to build the house."

On request, Thomas Harter, chief economist of the Mortgage Bankers Association, sharpened his pencil the other afternoon and came up with a comparison for high-income households in the 50 percent tax bracket who are considering either a $125,000 house with a $100,000 mortgage or a $250,000 house with a $200,000 mortgage.

Figuring the mortgage interest rate at 15 percent in both instances, his extrapolation for mortgage tables showed that the $100,000 loan would require a monthly amortization payment of $1,265 the first year for a total of $15,180 -- not including property taxes or insurance. Of that amount $15,000 would be interest, which is deductible on income tax filings. Thus, if the buyer is in a 50 percent tax bracket, the actual net cost would be only $7,500 or 7 1/2 percent.

A purchaser with confidence that the value of the house will increase more annually than 7 1/2 percent is getting more than full value for the money spent on interest. In the case of a $250,000 house with a $200,000 loan, all the figures would be doubled.

Another example might be a couple in the 33 percent tax bracket who own a house with a $50,000 mortgage at 8 percent on which payments has been made for 10 years. After 10 years, the owners would still owe $43,850 on a 30-year mortgage but would be paying only $367 a month to amortize the mortgage.

At that point the annual interest charge would be about $3,500 annually. On the basis of a 33 percent taxable income bracket, that couple would be paying $2,334 in net interest after taxes.

If the couple is anticipating even higher income and has the wherewithal to sell the existing house and get enough money net (about $50,000) for a down payment on a $250,000 house, then the mortgage on that new house would be $200,000.

But assume it would be at today's rate of about 15 percent. The first year's payment would be almost totally interst, approximately $30,000. But the actual monthly payments on a 30-year mortgage schedule would be $2,530. That's a heavy amount but after taxes it would be only $1,697 -- still figuring it in the 33 percent tax bracket, the saving would be greater.

The example does indicate that greater tax savings are available in higher interest loans if the higher monthly payments can be met.

Instead of waiting until the end of a tax year to file for a rebate, some owners add another deduction to their withholding statement and have less tax deducted from their salaries.

Broker Richard Purvis, now in charge of Virginia operations for Hugh T. Peck Properties Inc., said that the market in luxury houses -- along with others -- continues to be active because may buyers continue to have confidence in real estate as an investment and in the likelihood of continued appreciation in value.

Purvid cited the case of a $288,500 house recently purchased by a couple with a combined income of $100,000 a yar. This couple already owns a house, which is not yet sold, and has an equity of about $42,000 in it.

Purvis said the deal on the house was possible because the couple had $17,000 in cash available, assumed at $125,000 first trust on the new house, plus a $25,000 second trust and also a third trust of $121,500 from the seller. p

Of that $121,500, the seller is due to get $41,500 in July (when the buyer's house is expected to be sold to produce $42,000 net) and the seller will hold the remaining $80,000 note for seven years at interest only but with payment due in 1987.

Why was the seller so compliant in providing financial aid? Purvis said the seller was willing to make the deal because the house is vacant and had been on the market for a year.

When exceptionally expensive houses are being sold by builders, there is always consideration of the tax situation of the buyer. Arden Baker, a partner in the Crowell-Baker firm that builds large houses in Potomac, said that "conservation of income is important to all our buyers." He said that they are also aware that annual real estate taxes that might be $7,000 are also deductible items.

David Weiss, treasurer of DesignTech, a Gaitersburg firm that builds in Potomac and in eastern Montgomery County, said that high mortgage rates "clearly limit the ability of people to go into new houses and to qualify for mortgages."

But he also said that the net cost of higher interest of a 15 percent mortgage easily be recovered in three years if house prices continue to increase annually by more than 10 percent. He and other builders and brokers even held out hopes that today's high mortgage rates might drop and that refinancing might be possible within a few years at a lower rate.

Meanwhile, all the actual details on the tax savings available from mortgage interest and property taxes can best be worked out by the individual householders or by their tax advisers. IRS provides information in its Tax Information for the Homeowner pamphlet, No. 530, and another publication on house buying and selling (No. 523).