Savvy real estate owners across the country are saving millions of dollars a year by bartering away their properties through tax-deferred exchanges rather than selling them outright. But the exchange technique is not for everyone - and is certainly not a do-it-yourself proposition, warns a top legal authority on the subject.

Michael P. Sampson, director of the graduate tax program of the University of Baltimore and general counsel to the country's principal organization of real estate exchangors, calls bartering properties "a deceptively simple-sounding concept that can be extraordinarily tricky."

Sampson contends that property swapping, which postpones capital gains taxation for owners, is the hottest real estate topic of 1979 among small and large-scale investors. As a result, the Internal Revenue Service is paying closer attention to the details of individual exchanges and is making strict adherence to the rules of the tax code all the more important.

Section 1031 of the Internal Revenue Code requires that no gain or loss be recognized for tax purposes when equal ownership interests in investment or business properties of "like kind" are swapped, one for one. Only when equity interests actually are sold - for a profit or for a loss - does the Treasury view the transaction as a taxable event.

Thus, the owner of 30 acres of timberland that shoots up in value because of rezoning can postpone capital gains taxation indefinitely through successive equity trades. He or she can trade the land interest for an apartment building that has high depreciation write-offs an the potential for rapid growth in value.

Later, the same owner can trade all or a portion of the building equity for such investments as a Montana cattle ranch or mineral or water rights in the Southwest, or Atlantic City beach frontage.

These are all acceptable tax-saving trades, says Sampson, but prospective users of the technique had better watch out for some serious pitfalls.

First, they should make certain that their property is, in fact, business or investment real estate. Tax-deferred exchanges of primary residential property - such as one's principal home - do not qualify under Section 1031. Many properties offered for exchange are really mixed-use real estate such as a farm where the owners live in a house and use a little of the surrounding acreage as their yard.

Sampson advises that in such cases, the house and yard have to be carved out of the farm for exchange purposes - requiring a judgment that the IRS may challenge later. The IRS could construe a $900,000, 250-acre dairy farm as including $130,000 in residential property in the form of a house and five acres, for example.

The house and five acres could e sold together at market value, with the profits then reinvested (tax deferred) in a higher-priced principal home. Or, if the seller is 55 or older, up to $100,000 of the gain could be tax free. The 245 acres of dairy farmland could be exchanged at the same time - tax free - for an interest in an income-producing office building.

Vacation or resort properties that partially qualify under IRS rules as investment properties - that is, those that are used by their owners for vacation 14 days a year or 10 percent of the total rental days - also require special care. The IRS could regard them as personal residential property and not go along with the exchange of your Ocean City, Md., condominium apartment for a piece of commercial acreage in Florida.

Second, Sampson believes that owners should keep documents to show that their primary purpose in disposing of the property was to exchange, and not to sell. This means inserting clean language - often missing in exchange contracts today - stating that the property was not offered for sale initially, but for trade.

The owner of a hotel, for example, might write a contract stating that he offers to exchange his property with an investor if she can acquire a suitable ranch property within 90 days. The contract also might state that the hotel then could be sold to her for a specific amount of money.

Sampson also advises exchangors to be certain that their interests in real estate properties are of "like kind." Tax court cases have provided a very broad definition of like kind - gas or water rights for a shopping center are acceptable, as are farms for mountains, but not everything can qualify.

For instance, an interest in a restaurant could not be exchanged for real estate, nor could a second mortgage note be bartered tax free for a rental home.

Finally, Sampson says exchangors should seek competent accounting, legal and tax advice before structuring any deal. Most real estate brokers are not knowledgeable about the technique, but those who belong to special training organizations such as the Sarasota, Fla.-based Academy of Real Estate or groups such as the Metropolitan Washington Real Estate Exchangors may be.

Many real estate attorneys in the eastern half of the country are not felf to be familiar enough with the IRS rulings and tax court decisions on exchanges, but may be able to recommend colleagues who have made special studies of the field.

Sampson has written two books on the subject, the latest for the Acdemy of Real Estate (he is its general counsel). He is giving four-day seminars on exchanges around the country. Sampson's 1031 Casebook, containing all regulations, IRS rulings and key cases pertaining to real estate exchanging, is available for $24.95. His address is 614 G. St. SW. CAPTION: Illustrations 1 and 2, no caption By Robin Jareaux - The Washington Post