Some states are going after multinational corporations that avoid state taxes by stashing some of their earnings in offshore tax havens, an effort aimed at recouping some of the more than $20 billion states lose to such gimmicks each year.

Shifting income to subsidiaries in places like the Cayman Islands or Bermuda, which have minimal or no taxes, allows corporations to avoid U.S. and state taxes on those profits. Congress has been unable to thwart the practice at the federal level, but some states are taking action.

Montana was first about a decade ago, followed by Oregon just last year. Now, Maine is looking at legislation modeled on the Montana law. Minnesota Gov. Mark Dayton, a Democrat, is studying the issue as well.

All but four states collect taxes on corporate income, based on the amount of money a company makes in that state. If a company operates in multiple states, it pays taxes on the amount of income it earned in each one, based on a formula set by state law. Some states also tax a percentage of the profits earned by international firms. But multinational companies that hide earnings in offshore tax havens can avoid paying taxes on that money.

Maine lawmakers are considering a bill that would add 38 known offshore tax havens to the formula of calculating corporate tax collections in the state.

“If a big company like Apple sells things in Maine, they should pay a portion of their corporate tax in Maine, even if they have income in Bermuda,” said Democratic Rep. Adam Goode of Bangor, the sponsor of the bill.

The Maine Legislature’s Joint Taxation Committee voted 8-5 for the bill last month, and Goode is optimistic the full Legislature will follow suit.

Montana and Oregon already have laws allowing them to collect those taxes. Montana’s 2004 law is seen as the model; it collected $7.2 million in extra revenue in 2010, the most recent year for which numbers are available. Oregon, which passed its law last year, anticipates an additional $18 million in fiscal 2014-15, according to Bob Estabrook, spokesman for the Oregon Department of Revenue. By the time the two-year budget cycle ends in fiscal 2016-17, Oregon expects to collect an extra $42 million, Estabrook said.

Mike Kadas, director of the Montana Department of Revenue, said the law there has boosted corporate tax collections by between 5 percent and 7 percent. “That number is growing every year as we see more multinationals taking advantage of tax havens,” he said.

Two other states – Alaska and West Virginia – and the District of Columbia require companies with subsidiaries in tax havens to include that revenue in their income tax reporting. But none of those states lists specific tax havens in its tax code, a provision that would make the statutes stronger, according to experts.

There is some disagreement on the complete list of countries that are tax havens, but the Cayman Islands, Bermuda, Luxembourg, Ireland, the Isle of Man and the British Virgin Islands are frequently mentioned.

One of the most popular tax shelters for corporations is a domestic one: Delaware, which allows companies to shift royalties and similar revenues to holding companies in the state, where they are not taxed. In the past decade, corporations have taken advantage of Delaware’s rules to save an as much as $9.5 billion in taxes they would have owed to other states. In many ways, the state is less strict than offshore tax havens such as the Caymans and the Isle of Man.

“States like Delaware are going in the opposite direction and making it easier for corporations,” said Matt Gardner of the Institute on Taxation and Economic Policy, which is affiliated with Citizens for Tax Justice, a left-leaning advocacy group.

A U.S. Senate report released last month said foreign tax havens cost the U.S. $150 billion a year in lost revenue. It didn’t address state tax losses. Apple, for example, has paid no federal or state income taxes on tens of billions of dollars in overseas income over the past four years. Apple CEO Tim Cook told Congress last year his company is complying with all tax laws, state and federal. He called for “vast simplification” of the U.S. tax code.

“We know it’s legal, and that’s the problem,” said Dan Smith, a tax and budget expert at U.S. PIRG, a consumer advocacy group. “The average person who is paying their taxes and seeing how we’ve cut a lot from budgets and priorities that people care about says, ‘If I have to pay my taxes, why can Apple abuse the rules and not pay any taxes?’ ”

Though Congress has so far been stymied in its efforts to deal with the problem, Smith said “states need not wait for action in Washington.”

In a recent report, U.S. PIRG outlined a two-step process states could pursue to close the loophole. First, the report said, states should adopt “combined reporting,” which requires companies to list the profits of all of their subsidiaries on their tax forms. Then the states must close what’s known as the “water’s edge” loophole, which allows companies to exclude their U.S. profits held in offshore tax havens when calculating the taxes they owe.

“By modernizing their tax codes with this simple reform, states can curb incentives for moving business offshore, level the playing field for small businesses that compete with multinational corporations, and protect regular taxpayers from picking up the tab for tax dodgers,” Smith said.

To date, 24 states and D.C. have combined reporting. Montana does not have it now, but there are bills in the Legislature that would make the change, Kadas said. “A cleaner way of doing this would be to eliminate the ‘water’s edge’ and do worldwide reporting. That would have about doubled the numbers we’re generating now,” he said.

Small businesses that aren’t able to set up offshore subsidiaries generally support laws that seek to capture the tax income from large corporations. In state legislatures, their support helps balance – and sometimes trumps – opposition from large multinational companies, according to Dan Bucks, the former chief of Montana Director of Revenue “If you are a small businessman, you say, ‘I follow the law. I don’t get to follow some other country’s law,’ ” he said.