It got so bad that late last year Starbucks promised to pay an extra £10 million — about $16 million — in 2013 and 2014 above what it would normally have had to pay in British income taxes. What it would normally have paid is zero, because Starbucks claims its British subsidiary loses money. Of course, that subsidiary pays a lot for coffee sold to it by a profitable Starbucks subsidiary in Switzerland, and pays a large royalty for the right to use the company’s intellectual property to another subsidiary in the Netherlands. Starbucks said it understood that its customers were angry that it paid no taxes in Britain.

Starbucks could get away with paying no taxes in Britain, and Apple can get away with paying little in the United States relative to the profits it makes, thanks to what Edward D. Kleinbard, a law professor at the University of Southern California and a former chief of staff at the Congressional Joint Committee on Taxation, calls “stateless income,” in which multinational companies arrange to direct the bulk of their profits to low-tax or no-tax jurisdictions in which they may actually have only minimal operations.

Transfer pricing is an issue in all multinational companies and can be used to move profits from one country to another, but it is especially hard for countries to monitor prices on intellectual property, like patents and copyrights. There is unlikely to be a real market for that information, so challenging a company’s pricing is difficult.

“It is easy to transfer the intellectual property to tax havens at a low price,” said Martin A. Sullivan, the chief economist of Tax Analysts, the publisher of Tax Notes. “When a foreign subsidiary pays a low price for this property, and collects royalties, it will have big profits.”

The United States, at least theoretically, taxes companies on their global profits. But taxes on overseas income are deferred until the profits are sent back to the United States.

The company makes no secret of the fact it has not paid taxes on a large part of its profits. “We are continuing to generate significant cash offshore and repatriating this cash will result in significant tax consequences under current U.S. tax law,” the company’s chief financial officer, Peter Oppenheimer, said last week.

A company spokesman says the company paid $6 billion in federal income taxes last year, and “several billion dollars in income taxes within the U.S. in 2011.” It is a testament to how profitable the company is that it would still face “significant tax consequences” if it used the cash it has to buy back stock.