Sen. Bernie Sanders, I-Vt., on Monday proposed an "inequality tax" that would hit McDonald's, J.P. Morgan and Walmart especially hard, according to the Sanders campaign.

The presidential candidate would add the tax on companies with a large gap between the CEO's pay and the median salary of its workers.

"It is time to send a message to corporate America," Sanders said. "If you do not end your greed and corruption, we will end it for you."

The tax would apply to companies with revenue of more than $100 million, both private and public, where the CEO makes at least 50 times the median salary of the workers. It's a sliding scale starting with an added tax of half a percent and rising to 5% for companies whose CEOs make more than 500 times the median salary of the workers.

Sanders said the tax would raise about $150 billion a year.

While Sanders' chief target is richly paid CEOs, the tax ends up hitting firms with large, lower-paid workforces. Tech companies, for instance, would largely escape the tax despite their lofty CEO salaries, since tech workers are well-paid.

The companies that would be hardest hit are mostly in retail and banking or are restaurant chains. Sanders' campaign said that McDonald's would have had to pay an extra $111 million in taxes last year under the plan. Walmart would have had to pay $794 million more, Home Depot would have paid $538 million more, and J.P. Morgan Chase would have paid an extra $992 million.

The Securities and Exchange Commission now requires companies to disclose the pay gap between the CEO and median salary. But there are no set rules for how companies have to calculate median pay, and the ratios can change dramatically year to year.

Other companies with large pay gaps, according to SEC filings, include Chipotle Mexican Grill, Coca-Cola, Dollar Tree, Kohl's and Gap.