One of Wall Street's major industries is creating new financial products. And now it has come up with a beauty: corporate divorce insurance. Wall Street has always gotten fees for marrying companies, then another set of fees for splitting them up. But now we've got takeovers crafted to reduce the cost of breaking up if today's dream corporate marriage turns into tomorrow's messy divorce.

Who pays the premium for this insurance? You can be sure it's not Wall Street. Rather, the price is borne by some stockholders of the selling company, those that find themselves having to pay taxes on deals that could have been done tax-free.

No one's buying big tombstone ads to announce the advent of divorce insurance. But if you crunch the numbers of three pending takeovers -- Ameritrade's $2.5 billion purchase of TD Waterhouse, Johnson & Johnson's $26 billion purchase of Guidant and VNU's $7 billion purchase of IMS Health -- you see something funny's happening. Some shareholders will pay capital-gains taxes today to reduce taxes for the acquiring company should it decide someday to unload the business it's buying.

Let's start with the Waterhouse deal. Last month Ameritrade and TD Bank Financial Corp., owner of Canada's huge Toronto Dominion Bank, announced that TD will swap Waterhouse for a 32 percent stake in the combined company. It all looks pretty straightforward. But if you read Ameritrade's filings with the Securities and Exchange Commission, you see that something wasn't mentioned in the news releases: $20,000 in cash, to be exact. So TD is swapping Waterhouse for 193.6 million Ameritrade shares plus the soupcon of cash. Why the cash, which isn't even enough to be a rounding error? To make this a taxable transaction, rather than a tax-deferred swap of Ameritrade shares for TD's stock in its Waterhouse subsidiary.

This way, Ameritrade says, if it sells Waterhouse, its cost for tax purposes will be about $2.5 billion. Otherwise, it would be much lower. Given Ameritrade's tax bracket, the difference could approach $1 billion. That's well worth a $20,000 investment.

TD will have a taxable gain on the sale to Ameritrade. It wouldn't say how much but did say the gain will be offset by its losses elsewhere. Because TD will own about 40 percent of the combined company after some final papers are shuffled, it benefits by about 40 percent of any future tax benefit. Nice.

Lehman Brothers tax expert Robert Willens discerns similar motives in the way that J&J is buying Guidant and VNU is buying IMS. (Neither couple would talk to me.) Each buyer is paying about 60 percent with stock, the rest with cash. Normally, says Willens, the stock portion would be tax-free for selling shareholders until they sold the acquired stock. But these deals aren't normal, because the deals are structured to make the transactions immediately taxable.

Willens says that this way, J&J's cost of Guidant for tax purposes will be its purchase price: call it $26 billion. Otherwise, J&J's so-called tax basis would be extremely low. Let's say Guidant, which makes cardiac devices, doesn't turn out to be J&J's permanent heartthrob. Even though J&J vows that Guidant is forever, it knows that if things don't work out, it can sell Guidant without a ruinous tax charge. The same is true for VNU and IMS.

It's impossible to calculate how much tax Guidant and IMS shareholders will have to pay on stock that they might otherwise have gotten tax-deferred. But in macro terms, this is a can't-miss deal, because individuals pay Uncle Sam 15 percent at most on long-term gains, while corporations pay 35 percent. "It's a tax-rate arbitrage," Willens says.

Corporate marriage is grand. Especially when it comes complete with a prepaid divorce.

Sloan is Newsweek's Wall Street editor. His e-mail address is sloan@panix.com.