Apple sold slightly fewer iPhones in the final months of 2017 than it did the year before, but higher prices compensated for the dip.
The firm reported a record $20bn (14bn pounds) in quarterly profits, driven by strong growth in Japan and Europe.
The results, released on Thursday, were the first to provide a glimpse of sales of the firm’s expensive iPhone X.
Apple boss Tim Cook said sales of the product, which starts at about $1,000, had surpassed the firm’s expectations.
Apple released the 10th anniversary phone in November. It has been the top-selling phone every week since, Mr Cook said.
Investors had been worried that demand for the firm’s products may be dimming, concerns that appeared to be bolstered by a weaker-than-expected sales forecast for coming months.
The number of iPhones sold in the period also slipped 1% year-on-year to 77.3 million, but Apple executives said it was important to remember that the quarter was one week shorter than in 2016.
Quarterly revenue climbed 13% year-on-year to a record $88.3bn.
Mr Cook said he was watching figures such as the 1.3 billion active Apple devices around the world, which provide a strong customer base for the firm’s growing services businesses, which include Apple Pay and other revenue streams.
And analyst Carolina Milanesi, of California-based Creative Strategies, tweeted that "1.3 billion users most of whom are extremely engaged with their devices is why the services numbers will be more and more interesting going forward".
Apple has been under a cloud after the firm revealed that it deliberately slowed batteries in older phones, prompting investigations in several countries.
It has since apologised, offering customers cheaper batteries and other modifications, but analysts have said that could reduce replacement purchases, potentially affecting the firm’s bottom line.
After an initial fall, Apple shares climbed more than 3% in after-hours trade.
Last year Apple launched three new iPhones, but one was not like the others.
The iPhone X was the main event, the talk of the town. In contrast, the iPhone 8 and 8 Plus felt obsolete before Tim Cook had even finished his presentation. Investors were worried that the presence of the iPhone X would put off people buying the cheaper iPhones. And, given the X started at $999, those people may decide not to buy an iPhone at all.
iPhone X压轴，街谈巷议。相比之下，在蒂姆库克结束演讲前，人们认为iPhone 8和8 Plus都已经过时了。投资者担心iPhone X的出现会造成人们推迟购买更便宜的iPhone。而且，考虑到iPhone X的起售价为999美元，人们可能决定不买iPhone了。
And that appears to be basically what happened. Apple sold marginally fewer iPhones compared with this time last year (though the company blamed that on a shorter accounting period compared with the same time in 2016).
With the average selling price going up by around $100, to $796, it means Apple may be selling fewer iPhones, but it is making more from each one.
Apple investors will be seeing it like this: selling fewer iPhones but dramatically upping the price is certainly one way to solve that ever-present supply chain headache.