The United States loses, according to my estimates, close to $70 billion a year in tax revenue due to the shifting of corporate profits to tax havens. That’s close to 20 percent of the corporate tax revenue that is collected each year. This is legal.

Meanwhile, an estimated $8.7 trillion, 11.5 percent of the entire world’s G.D.P., is held offshore by ultrawealthy households in a handful of tax shelters, and most of it isn’t being reported to the relevant tax authorities. This is… not so legal.

These figures represent a huge loss of resources that, if collected, could be used to cut taxes on the rest of us, or spent on social programs to help people in our societies.

How do they do it?

For an example, look no further than your search bar. In 2003, a year before it went public, Google (now a multinational conglomerate known as Alphabet) began a series of moves that would allow it to obtain favorable tax treatment in the future.

(now Alphabet) Google Ireland Holdings bermuda “Managed” (now Alphabet) Google Ireland Holdings bermuda “Managed” (now Alphabet) Google Ireland Holdings bermuda “Managed” Google Ireland Limited IRELAND (now Alphabet) Google Ireland Holdings bermuda “Managed” Google Ireland Limited IRELAND Google Affiliate Google Affiliate Google Affiliate Africa europe Middle east (now Alphabet) Google Ireland Holdings bermuda “Managed” Google Ireland Limited IRELAND IRELAND $$$ Google Affiliate France (now Alphabet) Google Ireland Holdings $$$ bermuda “Managed” Google Ireland Limited IRELAND IRELAND $$$ Google Affiliate France First, it transferred ownership of intellectual property related to its all-important search and advertising technologies to an entity named Google Ireland Holdings. Why Ireland? Because not only did it have favorable corporate tax rates, its regulations also allowed Google Ireland Holdings to incorporate there but be “managed” in Bermuda. Google Ireland Holdings then created another Irish subsidiary, Google Ireland Limited, and granted it a license to use the technology now owned by the Irish parent company. Under this arrangement, which as far as we know is still in place, it is Google Ireland Limited that actually licenses the tech of Google’s main business to all the Google affiliates in Europe, the Middle East and Africa. (Google has a similar offshoot in Singapore that covers business in Asia). Google France, for example, pays royalties to Google Ireland Limited. That entity in turn moves its profits to Bermuda via a royalty payment to the Google Ireland Holdings.

See where this is going? In 2015, $15.5 billion in profits made their way to Google Ireland Holdings in Bermuda even though Google employs only a handful of people there. It’s as if each inhabitant of the island nation had made the company $240,000.

The corporate tax rate there?

Zero

In doing this, Google didn’t break the law. Corporations like Google are simply shifting profits to places where corporate taxes are low. It’s not just Internet companies with valuable intellectual property that do this. A car manufacturer, for instance, might shift profits by manipulating export and import prices – exporting car components from America to Ireland at artificially low prices, and importing them back at prices that are artificially high.

According to the latest available figures, 63 percent of all the profits made outside of the United States by American multinationals are now reported in six low- or zero-tax countries: the Netherlands, Bermuda, Luxembourg, Ireland, Singapore and Switzerland. These countries, but above all the shareholders of these corporations, benefit while others lose.

My colleagues Thomas Torslov and Ludvig Wier and I combined the data published by tax havens all over the world to estimate the scale of these losses. The $70 billion a year in revenue that the United States is deprived of is nearly equal to all of America’s spending on food stamps. The European Union suffers similar losses.

So what can be done?

Thankfully, Ireland has announced it will close the “double Irish” loophole that Google used, and arrangements that take advantage of that loophole must be terminated by 2020. But similar strategies will be used as long as we let companies choose the location of their profits.

Just look at what Apple did in 2014 — it’s one of the most spectacular revelations from the newly released Paradise Papers. After learning Irish authorities were going to close loopholes it had used, Apple asked a Bermuda-based law firm, Appleby, to design a similar tax shelter on the English Channel island of Jersey, which typically does not tax corporate income. Appleby duly obliged, and Jersey became the new home of the (previously Irish) companies Apple Sales International and Apple Operations International.

A potential fix would be to allocate the taxable profits made by multinationals proportionally to the amount of sales they make in each country.

Say Google’s parent company Alphabet makes $100 billion in profits globally, and 50 percent of its sales in the United States (a relatively similar scenario to the first quarter of this year, in which that figure was 48 percent). In that case, $50 billion would be taxable in the United States, irrespective of where Google’s intangible assets are or where its workers are employed. A system similar to this already governs state corporate taxes in America.

Such a reform would quash artificial profit-shifting. Corporations may be able to shift around profits, assets, and subsidiaries, but they cannot move all their customers to Bermuda.

This system is not perfect, but it’s orders of magnitude better than both the laws that now govern the taxation of international profits and the tax package being proposed by congressional Republicans. Under the proposed plan some international profits would be taxed at 10 percent, but there are many likely exemptions.

One advantage of allocating taxable profits as I suggest is that this reform can be adopted unilaterally. There is no need for the United States (or any other nation that wants to cut down on tax avoidance) to obtain permission from anybody.

But we’d still face an equally daunting problem, the far more shadowy – and ultimately illegal – tax evasion of ultrawealthy individuals, many of them with net worths already bolstered by the proceeds of corporate tax avoidance. Here’s an example.

Meet Michael. Michael is the (fictional) chief executive and owner of an American company, Michael & Company. Like many people, he would like to pay as little in taxes as possible. But unlike most people, he can take some steps that will allow him to do just that.

Michael & Co. America Anonymous Shell Co. Inc. Cayman Islands Michael & Co. America Anonymous Shell Co. Inc. Bank Cyprus Cayman Islands Michael & Co. America Anonymous Shell Co. Inc. Bank Cyprus Cayman Islands Michael & Co. America Anonymous Shell Co. Inc. Bank Cyprus Cayman Islands First, he creates an anonymous shell company incorporated in the Cayman Islands, which has lax regulations on disclosing the identities of company owners. He then opens an account under the shell company’s name in Cyprus (or one of many other tax havens, such as Switzerland, Hong Kong and Panama, whose banks cater to the wealthy and aren't reliable about cooperating with foreign tax authorities). Finally, Michael & Company buys fictitious services from the Cayman shell company (“consulting,” for example) ... … and, to pay for these services, wires money to the shell company’s Cyprus account.

The transaction generates a paper trail that can appear legitimate at first glance. But the reality is more insidious. By paying for fictitious consulting, Michael fraudulently reduces the taxable profits of Michael & Company, and thus the amount of corporate income tax he pays.

And once the money has arrived in Cyprus, it is invested in global financial markets and generates income that the Internal Revenue Service can tax only if Michael reports it or if his Cypriot bank informs the I.R.S.

It’s supposed to, but many offshore banks have routinely violated their obligations in the past, by pretending they didn’t have American customers or hiding them behind shell companies. So this way, Michael can evade American federal income tax as well as paying fewer corporate taxes through his company.

And meanwhile, in America, if he wants to use any of the money stashed in Cyprus, he can simply go to an ATM and make a withdrawal from his offshore account.

How do we know all this?

Until recently, we did not have a good sense of who owns the wealth held offshore, but with my colleagues Annette Alstadsaeter and Niels Johannesen, we have been able to make progress thanks to leaks over the last few years. In 2015, the Swiss Leaks revealed the owners of bank accounts at HSBC Switzerland, and in 2016 the Panama Papers revealed those of the shell companies created by the Panamanian law firm Mossack Fonseca. These showed that 50 percent of the wealth held in tax havens belongs to households with more than $50 million in net wealth, a minuscule number of ultra-high-net-worth individuals who avoid paying their fair share. In the Paradise Papers, we see that these are not only Russian oligarchs or Belgian dentists who use tax havens, but rich Americans too.

As I mentioned above, about 11.5 percent of world G.D.P. is held offshore by households. For a long time, the bulk of it was held in Switzerland, but a fast-growing fraction is now in Hong Kong, Singapore and other emerging havens.

We can stop offshore tax evasion by shining some light on darker corners of the global banking industry. The most compelling way to do this would be to create comprehensive registries recording the true individual owners of real estate and financial securities, including equities, bonds and mutual fund shares.

One common objection to financial registries is that they would impinge on privacy. Yet countries have maintained property records for land and real estate for decades. These records are public, and epidemics of abuse are hard to come by.

The notion that a register of financial wealth would be a radical departure is wrong. And the benefits would be enormous, as comprehensive registries would make it possible to not only reduce tax evasion, but also curb money laundering, monitor international capital flows, fight the financing of terrorism and better measure inequality.