White House chief economic advisor Gary Cohn is correct to say the stock market has plenty of room to run even after Republican lawmakers pass a tax bill, CNBC's Jim Cramer said Wednesday.

In an interview with Axios on Wednesday, Cohn said he doesn't believe the GOP's tax bill is completely priced into the market. "If you look at what the tax plan is going to do, I don't think it is factored in," Cohn said.

"I've never made a lot of money betting against Gary Cohn," Cramer said on "Squawk on the Street." "And I think he's right."

Since the Nov. 8 election, the S&P 500 has gained 25 percent, as of Tuesday's close.

Cramer contended that U.S. companies, including FedEx and Red Hat, have produced strong earnings this quarter, just before the passage of the tax bill, which would lower the corporate tax rate to 21 percent from 35 percent.

FedEx raised its full-year earnings forecast Tuesday and said the outlook could improve even more if the GOP passes a sweeping tax overhaul bill due for a vote in the House on Wednesday.

"All these companies just had very strong quarters before you even get to tax reform," said Cramer, host of CNBC's "Mad Money." "FedEx really kind of gave you this pastiche, which told you, 'after tax reform, we're instantly going to make X, and then if the economy heats up like we think it is, it's going to be far more than X.'"

"I'm with Gary. We didn't expect the tax bill to go through this fast," Cramer said. "There's stuff in this bill that's so great for corporations. It's incredible."