The 12th of November was a day of unusually entertaining political theatre at Westminster.
Three executives from large multinational corporations were ritually flagellated by Parliament's Public Accounts Committee as penance for the alleged tax sins of their employers.
Starbucks' head of finance, Troy Alstead, was forced to portray his company as a perennial commercial flop, in order to account for its peculiar failure to record a taxable profit in the UK for 14 out of the last 15 years.
He was followed by Amazon's Andrew Cecil, who was reduced to stuttering when he was accused of being "pathetic" for his inability to disclose something as basic as how much of his firm's European sales came from the UK last year.
Last up was Google's Matt Brittin. In contrast to his two peers, Mr Brittin did not seek to evade or apologise.
Yes, of course Google minimises its tax bill, by operating in Bermuda and Ireland, he said. Google had a duty to its shareholders to minimise its costs. And besides, the UK still benefited from Google's many free products, not least its search engine, which were engineered by thousands of employees in California.
But although Mr Brittin acquitted himself best by virtue of sheer bravado, was his confidence justified?
Do companies like his pay their fair share or not? And if not, how do they get around the rules?
Location, location, location
The planet is littered with hundreds of different nations and legal jurisdictions, each with its own peculiar set of tax rules.
For a big internationally-nimble corporation and its financial advisers, this presents an intellectual challenge akin to Sudoku - where to locate its many different subsidiaries and how best to arrange their affairs to minimise the total tax bill?
"What you've got is companies undoubtedly under competitive pressure to reduce cost, and tax is a cost," explains John Whiting, director of HMRC's Office of Tax Simplification.
This was particularly true over the 10 or 20 years leading up to the 2008 financial crisis, a period that saw the unprecedented spread and consolidation of global businesses across the planet.
For a US or Asian company choosing to expand into Europe, or to consolidate their existing European businesses, this inevitably presented a lot of decisions about where exactly to locate their factories, service- and distribution-hubs, and regional headquarters.
All three of the companies grilled by MPs had, understandably, chosen low-tax jurisdictions.
"Multinationals have more opportunities than purely domestic businesses to make locational decisions," says Bill Dodwell, head of tax policy at the global accountancy firm Deloitte.
But he adds: "Tax is one of the things they look at, but not the only, or even the most important thing." More important can be the availability of local expertise and suppliers, which tends to lead businesses to cluster in particular locations.
Nonetheless, tax is still an issue, and can be the defining issue for where a business cluster develops in the first place.
For example, Starbucks said that it sourced its UK coffee from its wholesale trading subsidiary in Switzerland.
That may be sensible commercially - it's cheaper to have one team responsible for sourcing all of Starbucks' coffee, and Switzerland is apparently the centre of the world coffee-trading business.
But it is hard escape the conclusion that Switzerland would not be a major centre for coffee trading in the first place if it did not charge a lowly 12% tax rate on the trading profits.
Race to the bottom
It is not just the companies that are under competitive pressure to reduce their taxes. The tax jurisdictions themselves also compete with each other to attract more business.
"Ireland went out and out to cut their corporate tax rate to 12.5%, nakedly to attract more business," notes Mr Whiting.
Indeed, when the Irish government had to be bailed out by the rest of Europe last year, there were rumours - that never materialised - that Dublin would be forced to raise its corporate tax rate as a quid pro quo.
Google was one business to take advantage of Ireland, locating its two data centres there, employing 3,000 people to co-ordinate marketing and sales of advertising space across Europe.
In the case of Starbucks, the Netherlands even went so far as to offer the coffee chain a special and secret tax deal to win its headquarters business - something the UK tax authorities make a point of never offering.
Moves to impose a common corporate tax rate across Europe have so far come to nought, and Mr Dodwell expects things to stay that way. Not only would it create winners and losers (notably Ireland), but it also raises the hoary question of how to divide up the proceeds and would deprive countries of the option of offering a cheap tax rate to maintain their competitiveness when all else fails.
But in the absence of such agreements, there has been something of a race to the bottom over the last few decades, with most countries steadily cutting the tax rate that companies must pay on their profits.
"Corporation tax is something of a dying tax in its current form," says Mr Whiting, although in the UK it still provides some 7-8% of HMRC's total revenues, a much higher share than in other countries.
"It's a tax that was designed to tax goods and services you could see. But a car is no longer just made in Birmingham. It is made internationally."
During the boom years of the last decade, tax competition between countries was particularly intense, as many businesses were making decisions about where to invest.
But now the boom is over, things look different. Cash-strapped governments are under pressure to squeeze out more tax revenues wherever they can - hence the parliamentary committee's enquiry.
"What we are seeing to a degree is a catch-up by the tax authorities," says Mr Whiting.
As for the businesses themselves, they have already made their investment decisions. And, as Mr Dodwell says, once they've already set up, "companies hate moving", so you might think they have become easy game for higher taxes.
But even if a company cannot move its business outside the UK, it still has ways of moving its taxable profits outside the country.
For example, even if it is acting with the best of intentions, a foreign firm running a business in "high tax" Britain may face a number of decisions with awkward tax implications:
- If its UK business needs more money, should it lend it the money, and if so, how much interest should it charge?
- How much should Starbucks UK pay the rest of Starbucks for access to the US firm's brand, suite of innovative beverages, coffee-making technology, engineering support, and so on?
- How much should Ford UK pay to the various other bits of Ford scattered around the world for the parts they produce that are then assembled into complete cars in Dagenham?
All of these are cases of what is known as "transfer pricing". They all involve payments from the UK business to non-UK companies within the same corporate empire.
As such, they all create the temptation for a multinational to overprice the goods and services provided, thereby decreasing the taxable profit in the UK and shifting it somewhere else.
Transfer pricing is not a new problem. The first attempts to tackle it date back to before World War II.
In principle, these kinds of intra-company transactions are perfectly legitimate, so long as they are done at an "arms-length" fair market price.
In practice, the transactions are often ones that would never take place if they were done on an open market, making it impossible for a tax authority to say with certainty what the fair market price would be. What is the fair price of Google Earth, developed in the US and free to download worldwide?
Companies have to document their justification for the prices they use. It is then up to the tax authorities to challenge them.
In Starbucks' case, Mr Alstead could point to the fact that a large number of entirely independent operators run its coffee outlets as a franchise, and willingly pay the same fee that it charges its own loss-making business in the UK. The argument impressed HMRC (after Starbucks cut the fee rate) but not the MPs.
Besides the government's evident need to raise more money, what has also brought matters to a head is the rise of ecommerce.
"For a company like Amazon, a lot of the back-end stuff can be done anywhere in the world," points out Mr Whiting from the Office of Tax Simplification. "With the internet, services can be delivered totally remotely these days."
That has significantly muddied the waters for an HMRC with limited manpower. Trying to work out exactly how much of the value created by a company like Amazon actually takes place in the UK - and therefore should be subject to UK tax - is harder than ever.
"This is not just a problem in the UK," says Mr Dodwell at Deloitte. "What the world wants is a means of taxing internet businesses more than they can on the basis of where they are located."
He says it is encouraging a move away from corporation tax - taxing profits, which can be easily shifted abroad - towards taxing sales via VAT.
But VAT is far from perfect.
Amazon got picked up by the parliamentary committee for running its sales out Luxembourg. When you buy a book on amazon.co.uk, you actually enter into a legal contract with, and pay your money to, Amazon Luxembourg.
One reason is under current EU rules (being replaced from 2015), if you buy an ebook from Amazon, it is the Luxembourg VAT rate of only 3% that you end up paying.
Another problem with VAT, according to Mr Whiting, is that it is a blunt instrument. Some businesses operate on very thin profit margins that would be wiped out by the tax.
Differences in VAT between countries also encourage the equivalent of booze cruises to Calais.
But the focus on VAT raises another important point - while companies may avoid paying tax on their profits, they do contribute to the public purse in many other ways.
Tech companies such as Google for example historically paid employees in shares that then shot up in value. While the resulting high pay ate into the firms' profits - and therefore their corporation tax bill - it also meant those employees ended up paying a lot more income tax.
In the UK - when you tot up VAT, business rates, national insurance contributions, and so on - about 30% of tax revenues come from businesses, of which only eight percentage points comes from corporation tax.