U.S. corporations ranging from General Motors (GM) and Marathon Oil (MRO) to Wells Fargo (WFC) and H&R Block (HRB) and the portion of the population that has money invested in the stock market will be among the biggest winners from a Republican-led tax plan that passed Congress today.

President Donald Trump is expected to sign the bill, giving his administration its first major legislative victory after almost 11 months in office.

The bill reduces the corporate tax rate to 21% from 35%. Industries expected to benefit from the bill include automakers, banks and oil and gas producers. While some health care companies may suffer because the bill eliminates a mandate under the Affordable Care Act that Americans have to have health insurance or pay a penalty, others that have significant offshore earnings, including Pfizer (PFE) and Merck (MRK)  , could gain through repatriating that money, a JPMorgan analyst said in a note.

Technology companies, which have led most of the market's rally for 2017, will also benefit from the tax bill's provision on repatriation. The cash held overseas by some of America's largest companies could be used for stock buybacks that boost earnings per share. Goldman Sachs (GS) estimates that U.S. companies have $3.1 trillion in overseas earnings. Apple Inc. (AAPL) has the largest overseas stockpile at $268 billion.

Overall, the bill could boost earnings for S&P 500 companies by 9.1 percent, according to UBS equity strategists.

The biggest U.S. banks will see an average 13% increase in earnings per share from a drop in the tax rate to 21%, according to Goldman Sachs. Wells Fargo and PNC Financial Group (PNC) may have the biggest gains, Goldman said.

Apple CEO Tim Cook has reason to smile.

Among other bank stocks, M&T Bank Corp (MTB) , Regions Financial Corp (RF) and Citizens Financial Group (CFG) may also see significant boosts to their earnings, UBS analyst Saul Martinez said in a recent note.

Banks are also expected to benefit from higher interest rates. The Federal Reserve may raise benchmark interest rates as many as three time in 2018, especially if economic growth improves in the U.S. For banks such as Citigroup, however, those benefits will be offset to one degree or another by a decline in value of their deferred tax assets, reflecting net operating losses on mortgage securities hit hard by the financial crisis. Those assets will be worth less since they would reduce income subject to tax at a lower corporate rate. 

Airlines with significant DTAs, such as Delta Air Lines Inc. (DAL), will also see those assets suffer.

Energy companies will benefit from the lower rate, since they historically have had a higher tax burden than other companies. Energy companies have a median tax rate of 36.8% over the last 11 years, compared to the S&P 500's median tax rate of 30%, according to MarketWatch.

Marathon Oil Corp. and ConocoPhillips (COP) are the two highest taxed companies in the sector.

The bill's provision that opens part of Alaska's Arctic National Wildlife Refuge to oil and gas drilling could generate $1 billion in revenue over a decade.

Large automakers, such as General Motors Co. (GM) and Ford Motor Co. (F) , will benefit from the lower tax rate and the reduction on levies for repatriating overseas profits, according to UBS.

The final tax bill also kept an electric-vehicle credit, which could have hurt sales if it was included as Republicans in the House had previously proposed. Consumers are eligible for a $7,500 tax credit to defray the cost of plug-in electric vehicles.

General Motors, Volkswagen AG (VLKAY) , Tesla Inc. (TSLA) and Nissan Motor Co. (NSANY) are some of the automakers with electric vehicles.

Boeing Co. (BA) announced additional employee-related and charitable investments of $300 million after the lax law passed. Chairman and CEO Dennis Muilenburg said $100 million will be for workplace development, including training and education, another $100 million will be for "workplace of the future" facilities and infrastructure enhancements for Boeing employees, and the final $100 million will go toward corporate giving, with funds used to support demand for employee gift-match programs and for investments in Boeing focus areas for charitable giving.

"For Boeing, the reforms enable us to better compete on the world stage and give us a stronger foundation for the investment in innovation, facilities and skills that will support our long-term growth," Muilenburg said in a statement.

Boeing stock was little changed at $297.22 during afternoon trading on Wednesday.

AT&T (T) announced plans to invest an additional $1 billion in the U.S. in 2018 and will pay a $1,000 bonus to more than 200,000 employees.

"Congress, working closely with the President, took a monumental step to bring taxes paid by U.S. businesses in line with the rest of the industrialized world," said Randall Stephenson, AT&T chairman and CEO. "This tax reform will drive economic growth and create good-paying jobs. In fact, we will increase our U.S. investment and pay a special bonus to our U.S. employees."

Shares of AT&T, which is in the middle of a lawsuit with the Justice Department over its proposed merger with Time Warner Inc. (TWX) , rose by 1.18% to $38.50 at 3 p.m. EST on Thursday

The wealthiest Americans, those in the top one-fifth of of the top 1 percent, will share about $80 billion in tax cuts, while taxpayers whose income derives from owning a business will benefit from the big corporate and pass-through business tax cuts.

In turn, the bill is likely to make the tax code even more complex, generating work for lawyers and accountants and creating a new industry for the creation of tax shelters.

Apple, AT&T, Facebook, Pfizer are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells these stocks? Learn more now.

More of What's Trending on TheStreet: