You may not be paying too much for these stocks, Jim Cramer says

Investors might be getting a bang for their buck after retail helped lead a recent rally, CNBC's Jim Cramer said Wednesday.

"I was on the Wal-Mart call and Home Depot call ... and these quarters are so much better than expected that you may find out you're not paying as much. I think that's a key," he said on "Squawk on the Street."

Cramer said when he hears that he might be paying too much, he asks, "Are we paying too much for forward earnings or paying too much for current earnings?"

"Because if you listen to the commentary of these companies, you would say, 'You know what, it's a different game,''" he said.

On Tuesday, investors digested several quarterly results reports, including retail giants Macy's, Home Depot and Wal-Mart. In fact, Wal-Mart's U.S. stores had their best quarter in more than four years.

Cramer said he was shocked that the fourth quarter for retail companies was so great.

"Remember, Wal-Mart and Home Depot — these are huge. Macy's wasn't even that bad," he said.