CNBC's Jim Cramer said investors who bought Apple ahead of its first-quarter report made the right gamble.
The "Mad Money" host typically does not recommend buying a stock ahead of earnings, in case the company delivers a bad report. But the tech giant did not disappoint on Tuesday.
"Not only did Apple deliver a nice top- and bottom-line beat, but China, the major source of weakness last quarter, is turning around," Cramer said. "When I spoke to [CEO] Tim [Cook] about it, I was surprised how bullish he was."
While iPhone sales were down 17%, Cramer pointed out that Apple management said it picked up at the end of the quarter. Growth in the wearables segment and the nascent services business could make for a great second quarter, he added. Apple held its quarterly conference call after the market closed Tuesday.
Shares of Apple fell 1.93% during the session. The stock climbed 5% in after-hours trading.
"Apple bought back billions of dollars worth of stock with an average price of $167," he said. "Now it makes sense, too, as did the possibility that some enterprising analysts might soon realize, that the lifetime value of the service stream of an iPhone user … may turn out to be the greatest annuity of all time."
The Dow Jones Industrial Average and both added about 0.1% during the session.
Cramer said there were some bad trades made Tuesday. On zero news, many individual stocks, particularly in the packaged goods sector, rallied but lost those gains soon after, he said.
"Look, when the stock market does something stupid, that's your opportunity to take the other side of the trade and do something smart," Cramer said. "I don't like the market to denigrate itself. I do like it [today] 'cause it gave you a chance to buy Apple."
Disclosure: Cramer's charitable trust owns shares of Apple.