The Scottish Government has urged Westminster to simplify the UK tax system and abandon what it claims is “the unnecessary complexity which creates opportunities for tax avoidance through countless exemptions, reliefs, deductions and allowances.”

The call comes days after a deal was struck between Google and HM Revenue & Customs which was supposed to show how the UK government and taxman are toughing up on tax-shy multinationals.

“The recent deal between HMRC and Google shows historic gaps in corporate tax liability are now being addressed, but it is important that any such agreements fully account for historic unpaid taxes,” a Scottish Government spokesman told the Sunday Herald.

The Scottish Government claims that a Scottish anti-tax avoidance rule, more wide-ranging and targeted than a corresponding Westminster rule, allows Revenue Scotland to take action against arrangements which are considered artificial, even if they otherwise operate within the letter of the law.

Last month Google agreed to pay £130m in back taxes for a ten-year period, an amount that George Osborne described as a “victory” for the British taxpayer.

But within hours the “sweetheart deal” was being widely condemned for letting the search giant off the hook too easily and the arrangement, which is on top of £120m the company has already paid, is now facing three inquiries.

Last week SNP MEPs called on the European Commission to launch an investigation into Google’s UK tax settlement while on Thursday Google executives and HRMC tax officials are to appear before Westminster’s public accounts committee to discuss the search giant’s tax deal.

So how does Google – whose holding company Alphabet last week overtook Apple to become the world’s largest company – as well as other US multinationals get away with aggressive tax planning to minimise their taxes?

George Osborne’s Diverted Profits Tax, introduced last year with the aim of targeting the routing of profits overseas by multinationals, has done little to stop Google channelling its £4.4bn of annual UK sales through Ireland, the Netherlands and Bermuda.

The UK is Google’s largest market outside the US and, while the company has five large offices in the UK employing 5,000 staff, the company has been allowed to claim that it has no “permanent base” in the UK as all European sales are routed via Dublin.

At stake is the complex issue of where multinational corporations make their taxable profits. Big companies can throw up a smokescreen of confusion about where the main economic activity of their businesses took place allowing them to channel billions of pounds of cross-border transactions through low or no tax countries.

Using a controversial network which has been dubbed the “Double Irish and Dutch Sandwich”, once Google is paid for an advert in the UK the money is transferred to Google’s Irish subsidiary, allowing it to avoid the UK’s 20 per cent corporation tax.

Since 2008, Google’s headquarters for Europe, the Middle East and Africa has been in Ireland where corporation tax, at 12.5 per cent, is amongst the lowest in Europe.

From Ireland royalties are paid to a middle company in the tax-friendly Netherlands before the money from the Dutch company is repaid to another Irish subsidiary in Bermuda, which has zero corporation tax.

The complex web of international payments is perfectly legal despite the fact that Google has no staff or offices in Bermuda, where post office box 666 in the island’s capital of Hamilton is the conduit for some £8bn of transactions a year.

The arrangement brings Google’s average tax rate on all its overseas profits to around 5 per cent, rather than the 20 per cent it would pay in the UK.

Last week Google’s communication chief Peter Barron said that the company would from now on be taxed in the UK on a proportion of its advertising revenues but added that “it is very, very important to make it clear that the Bermuda arrangement has absolutely no bearing on the amount of tax we pay in the UK”.

Although multinationals claim to comply with relevant laws in the countries in which they operate, they benefit from the confusion of a mishmash of international bilateral tax treaties which were made for the pre-internet era when it was easier to pinpoint where, for example, an exporting manufacturer made its profits.

Last month the EU published it latest anti-tax avoidance proposals, but, despite recent progress at an international level in clamping down on tax avoidance, it is still likely to be years before loopholes are removed in a way that makes it impossible for multinationals to avoid paying their dues.

The British tax bills of other US multinationals

Many of the US companies most criticised in Europe for tax avoidance are tech giants, but not all. Retailer Amazon and coffee shop chain Starbucks are notable exceptions.

Facebook

In 2014, when the US social networking site enjoyed UK revenues of more than £700 million, it paid just £4,327 in tax: less than someone on the average UK wage would pay in income and national insurance contributions. In the same year the company’s global profits amounted to £2.4bn on which it paid a total of £86m to all tax authorities outside the US, bringing its worldwide corporation tax rate to 4 per cent.

Starbucks

The Seattle-based company which operates 843 coffee shops in the UK is reported to have paid £8.6m in tax between 1998 and 2012, a yearly average of £614,285 despite sales worth billions of pounds. Last year it paid £8.1m of corporation tax on profits in the UK of £34.2m. Last year the EU ordered the Netherlands to recover up to €30m in back taxes from Starbucks after concluding that it had benefited from an illegal tax deal. The Netherlands is under pressure to reform its tax system, which attracts international firms with tax rates of less than 10 per cent.

Apple

The California-based tech giant is estimated to have paid £11.8m in UK corporation tax on profits of £1.9 billion in the year to September 2014.

Amazon

The global online shopping giant paid £11.9m tax on UK profits of £34.4m and sales of £5.3bn. The EU is currently scrutinising whether Amazon’s recording of most of its European profits in Luxembourg is legal.