In January 1999, a trust set up by former Massachusetts Gov. Mitt Romney for his children and grandchildren reaped a 1,000% return on the sale of shares in Internet advertising firm DoubleClick Inc.

If he had given the cash directly, he could have owed a gift tax at a rate as high as 55%. Instead, Mr. Romney avoided gift and estate taxes by using a type of generation-skipping trust known to tax planners by the nickname “I dig it.”

The type of trust used by Mr. Romney is so important to the wealthy that ending its tax benefits “would put an end to much of estate planning as we know it,” said Stephen Breitstone, co-head of the taxation and wealth preservation group at law firm Meltzer Lippe Goldstein & Breitstone LLP.

Although Mr. Romney’s use of the tax-avoiding trust is both legal and common among high-net-worth individuals, it has become increasingly awkward for his candidacy since the disclosure of his remarks at a May fundraiser. He said that the nearly one-half of Americans who pay no income taxes are “dependent upon government” and “believe that they are victims.”

Mr. Romney’s effective income tax rate last year was about 14%.

He also has enhanced his family’s wealth by moving assets worth $100 million into a trust. Its value isn’t counted in the $250 million that his campaign cites as his net worth.

The bulk of the trust’s income comes from Mr. Romney’s interests in Bain Capital funds, hedge funds and other investments, according to his 2011 tax return. The return doesn’t show how much he paid for these holdings, nor the value assigned to them when he gave them to the trust, so it is unclear how much in total the trust has saved in gift and estate taxes.

“People like Mitt Romney make a lot of money, but they pay very little income tax,” said Victor Fleischer, a tax law professor at the University of Colorado, who has written extensively about private equity and taxes.

“Then, by dodging the estate and gift tax, they are able to build dynastic wealth,” Mr. Fleischer said. “These DoubleClick documents really show that tax planning in action.”

GIFTING TACTICS

Use of these types of trusts has grown as the wealthy employ increasingly sophisticated techniques to avoid both estate and gift taxes on money that they transfer to their families. In 2010, about 3 million U.S. trusts and estates reported more than $91 billion in income.

Multimillionaires use such trusts to avoid those taxes in three ways.

• They can assign a low value to assets they donate to the trust.

• When the trust sells assets at a profit, the donors can pay the relatively low capital gains taxes on behalf of the trust. Thus they leave more money in the trust, untouched by the much higher gift tax.

• By paying capital gains taxes, they can reduce the pile of wealth eventually subject to an estate tax when they die.

In February, the Obama administration proposed cracking down on the tax benefits. Administration officials estimated that closing the loophole that Mr. Romney used would bring the federal government almost $1 billion in the coming decade.

“LAUGHABLE’ ESTIMATE

That is a “laughable” underestimate, Mr. Breitstone said.

A billionaire might have to pay $500 million more in estate taxes if these estate preservation trusts are shut down, he said.

The sale of DoubleClick shares received before the company went public, detailed in previously unreported securities filings reviewed by Bloomberg News, sheds new light on his estate-planning strategies.

Mr. Romney or his trust re-ceived shares in DoubleClick eight months before the company went public in 1998. The trust sold them less than a year after the initial public offering.

The trust’s sale of the DoubleClick stake made it possible to save hundreds of thousands of dollars in estate and gift taxes.

A longtime target of Republicans, the estate tax imposes a 35% rate on estates greater than $10.24 million for a married couple. The gift tax — intended to prevent individuals from avoiding the estate tax by giving away assets before death — imposes a 35% tax on a married couple’s transfers above $26,000 in a year or $10.24 million over a lifetime.

The top estate and gift tax rates were 55% during the 1990s, when Mr. Romney’s trust was established, and they are scheduled to rise to 55% again next year.

When it released his 2011 tax returns last month, the Romney campaign said in a statement that the Republican nominee “has scrupulously complied with the U.S. tax code, and his income is reported and taxed at the applicable rates, and he has paid 100% of what he has owed.”

Mr. Romney has vowed that if he is elected president, he will cut the gift tax rate and repeal the federal estate tax altogether.

The Romney campaign didn’t respond to a list of questions about the tax avoidance transactions.

DIGGING IT

The vehicle used in the DoubleClick transaction is known as an “intentionally defective grantor trust” or by the acronym IDGT, hence the nickname “I dig it.” Such trusts permit donors to give potentially unlimited amounts to children free of estate and gift taxes.

Here is how they work: The person setting up the trust, such as Mr. Romney, contributes assets such as an interest in a fund or shares in a company. If the contribution is made before those assets appreciate — particularly when they are privately held and difficult to value — the owner of the trust can claim the gift tax obligation is low or nonexistent because the declared value is low or zero.

If the trust generates any income, such as by selling stock, the eventual tax bill is the responsibility of Mr. Romney, not the trust. By paying the capital gains tax, which was 20% in the late 1990s and is now 15%, he can avoid depleting the funds in the trust, in essence making an additional donation that is free of gift taxes.

That benefit in particular makes this type of trust “a more powerful driver of wealth transfer in estate planning than almost anything else,” Mr. Breitstone said.

In June 1997, DoubleClick an-nounced a $40 million investment by a group including Bain Capital, eventually giving the buyout firm a 17.7% stake in the company.

Like at other private-equity firms, Bain managers were permitted to co-invest personally in the firm’s deals.

Mr. Romney’s DoubleClick filings with the Securities and Exchange Commission indicate that he or his trust received some of the company’s shares as a co-investor, and others as his stake in Bain’s future profits, or carried interest.

He made a big profit for his heirs. Mr. Romney or his trust received the first batch of DoubleClick shares in June 1997, when Bain made its initial investment in DoubleClick.

In February 1998, DoubleClick went public. Its shares nearly quintupled over the next 12 months.

In January 1999, Mr. Romney’s trust sold $746,000 worth of DoubleClick shares for a gain of about $674,000, or an almost 1,000% return, according to an attachment to his April 30, 1999, filing with the SEC.

Because those shares were already in the trust before the sale, no gift or estate tax would be owed on the trust’s receipt of that cash. And according to the tax law governing an IDGT trust, Mr. Romney, not the trust, would be responsible for paying any capital gains tax triggered by the sale, potentially as high as $140,000.

Gains in the trust for his heirs remain free of gift taxes and potential estate taxes.

DoubleClick was purchased by Google Inc. for $3.2 billion in 2008.

PUBLIC ATTENTION

Public exposure of Mr. Romney’s various tax avoidance tactics may spur legislation cracking down on them, according to Mr. Breitstone.

Mr. Romney “uses every trick in the book,” he said.

“It’s going to be harder to do tax planning in the future. He’s bringing attention to things that weren’t getting attention,” Mr. Breitstone said.