Bloomberg reported last October that Google Inc. used two colorfully named (but completely legal) tax avoidance schemes— the Double Irish and the Dutch Sandwich —to cut their taxes by $3.1 billion over the last three years. What the heck are those, and are there any other crazy-sounding schemes we should know about?

The Double Irish

This shenanigan involves setting up a pair of companies in Ireland to disguise regular income as tax-deductible royalties on intellectual property.

Here’s how it works: First, a parent corporation in the United States (like Google) sets up a small corporate subsidiary in Ireland—let’s call it “S1.” The parent then enters into a legal agreement that gives the European rights to all of its “intangible” products—like, say, an Internet search algorithm—to S1. In return, S1 agrees to help market or promote those products in some way within Europe. By virtue of this arrangement, all of the parent’s European income from the products would be collected by S1.

The real trick comes next. At some point, S1 decides to relocate (at least on paper) its headquarters to Bermuda, which has no income tax. The company becomes a “dual resident,” which means that, from the Irish point of view, it’s subject to Bermuda tax law, but from the U.S. perspective, it’s still incorporated in Ireland. To complete the scheme, the parent company then sets up a second Irish subsidiary (S2), which, importantly, chooses not to beconsidered a corporation under U.S. law; this has the effect of hiding its finances from the IRS. Why are two Irish subsidiaries better than one? Because now S1 can license the parent company’s products to S2 in exchange for a stream of hefty royalty checks. This means that S2 can collect all the income, and be taxed by Ireland at a relatively low rate of 12.5 percent (compared to 35 percent in the United States). But the royalties it’s paying to S1 can be deducted from its income. In the end, S2 doesn’t have to pay that much in taxes, and the “royalties” that make their way to S1 are tax-free.

Wait, wouldn’t it be easier just to set up a subsidiary in tax-free Bermuda? Why would anyone opt for the Double Irish over the Single Bermudan? Because of tax treaties. When you transfer money within the EU, the government doesn’t take a cut in the form of a withholding tax. When money goes directly to an unregulated country like Bermuda, however, it gets taxed at the origin country’s normal rate.

The Dutch Sandwich

If you really want to get fancy, you can add another layer to chicanery and turn your Double Irish into a Dutch Sandwich. This ploy makes use of an agreement between Ireland and other EU countries to further reduce their tax burdens.

To make it work, the parent company sets up a third subsidiary (S3) in the Netherlands, with no other purpose than to funnel money from S2 to S1. Instead of licensing the parent’s products directly to S2, the Bermuda-based S1 grants them to its Dutch partner, who then passes them along. In other words, S1 and S2 are the bread around an S3 Dutch meat sandwich. What good is that? The Irish don’t tax money being moved among European countries (S2 to S3), and the Netherlands takes only a small fee for moving the money from S3 to S1. This makes it so the “royalties” checks can arrive in Bermuda virtually untaxed.

The problem with strategies like the Double Irish/Dutch Sandwich is that the money gets stuck outside of the United States, where the parent company can’t use it for domestic projects. If the company tried to “repatriate” the money to the United States, the IRS would hit it with an income tax, making the whole routine for naught. There are some fancy ways around this limitation, however—each named after the letter of the subsection of the tax code on which it depends.

The Killer B

Though this tactic has been increasingly thwarted by the IRS since 2006, it illustrates a key principle of exotic tax-dodging. Named after paragraph (2)(B) of section 368(a) of subpart D of part III of subchapter C of chapter 1 of subtitle A of title 26 of the U.S. Code, Killer B involves a parent company’s trading its own foreign subsidiary a large amount of stock for cash that has been accumulating overseas. The parent gets the money and the subsidiary can use the stock to make further acquisitions, which, of course, really benefit the parent in the end. Because of the “investment” nature of the exchange, no taxes are levied.

The Deadly D

This is a cousin to the Killer B, in which a parent company extracts cash from overseas by purchasing and then transferring a new company. Simply put, the parent buys some company X and then transfers ownership to a pre-existing foreign subsidiary. The subsidiary then pays the parent cash equal to the purchase price of company X. That allows the parent to free up money it already had, and get a new property, tax-free.

The Outbound F

The Outbound F, based on paragraph (2)(F) of same Internal Revenue Code, represents the state-of-the-art in repatriation dodges. First, a parent company buys another U.S. company, and then forces the new acquisition to promise a large cash transfer at some point in the future (which, as a domestic, within- corporation transfer, would be tax-free.) Then the acquired company sets itself up as a subsidiary in another country, borrows a whole bunch of cash from a previously existing sister subsidiary, and sends it back home to the parent. That switcheroo effectively eliminates the tax burden, because the subsidiary had promised to send over the cash when it was still American.

Got a question about today’s news? Ask the Explainer.

Explainer thanks Edward D. Kleinbard of the University of Southern California Law School.