Bernie Sanders asked federal accountants to tally up how many major corporations pay nothing in federal income taxes, and now we know the answer.

On the stump, Sanders has been denouncing the special treatment that he says big firms get from the government. It's been a crucial part of his pitch to voters throughout his unexpectedly successful presidential campaign so far.

The data the senator from Vermont requested from the Government Accountability Office do indeed suggest that the vast majority of firms don't pay federal corporate income taxes, but the report also complicates the story Sanders has been telling on the campaign trail.

Of the 1.6 million corporations active in the United States in 2012, 70 percent had no federal corporate income tax liability. (These firms likely pay other taxes, of course, such as payroll taxes and local sales taxes.)

Big firms, however, were more likely to pay at least some taxes than smaller firms. Just 42 percent of large companies -- those with assets over $10 million -- paid no corporate income tax. Of those that didn't, many weren't making any money anyway: 20 percent of profitable large firms paid no income tax.

On average, these large corporations with profits paid 14 percent of their income in federal income taxes between 2008 and 2012. By contrast, the rate on the books is 35 percent.

"Large corporations cannot continue to get more tax breaks when children in America go hungry," Sanders said in a statement. "That means closing corporate tax loopholes to raise the revenue necessary to rebuild America and create millions of jobs."

There a couple of reasons that corporations that are making money might not pay taxes on that income to Uncle Sam.

For one, when corporations lose money, they can count the losses against their income in the future, reducing how much they owe. According to the report, about 15 to 19 percent of corporations -- including equal shares of large and small firms -- got out of paying taxes by telling the federal government their earnings were just making up for losses in past years.

Corporations are also allowed to pay less in taxes when they invest in things like equipment and facilities. As a result, even when they're making money, firms sometimes don't have to pay any income taxes if they reinvest their profits. The authors of the report couldn't calculate how many firms were in this category, but given that more large firms are paying corporate income taxes in general, it seems safe to assume that small and middle sized firms are taking advantage of this provision of the tax code, too.

Liberal analysts argue this provision amounts to a giveaway for big firms that does little to stimulate the economy, but conservative observers contend that taxing companies on their investments means the company's shareholders are effectively taxed twice. The Joint Committee on Taxation has projected that the provision will allow corporations to save about $28 billion a year on their taxes over the next decade.

As for other kinds of corporate breaks, the report from the Government Accountability Office concluded that very few firms did not pay income taxes because tax credits made up for what they owed -- less than 1 percent.

Of course, even if those firms pay taxes, that doesn't mean that the credits don't save businesses a lot of money. In a previous report using data from 2011, the investigative agency put the cost of these credits to the federal government at $181 billion that year.