Last Updated Jul 31, 2018 5:53 PM EDT
Apple made a whopping $11.5 billion in profit in its latest earnings report, boosting its stock to an all-time high in pre-market trading.
The figures show Apple made more money from higher-priced iPhones in the latest quarter, even as the number of phones it sold stayed relatively flat. That means Apple is no longer the second-biggest smartphone maker behind Samsung. Huawei took that spot, research firm IDC said Tuesday, with 54.2 million phones versus Apple's 41.3 million.
Apple shares rose as high as $199.30, up 4.7 percent, after the company reported earnings for its fiscal third quarter ending June 30.
Apple phone sales rose just 1 percent from a year ago, which was expected, but the average selling price jumped 20 percent to $724 per iPhone -- that's up from $606 a year ago.
"[A]fter the heartburn seen from the earnings disappointments across tech bellwethers such as Facebook and Netflix over the last few weeks, Apple gave the Street and tech investors finally some good news," Daniel Ives, head of technology research at GBH Insights, wrote in a note.
CEO Tim Cook said its premium iPhone X, which starts at $999, was the top-selling iPhone in the quarter, despite costing a few hundred dollars more than previous iPhones. It features a brighter edge-to-edge screen and facial recognition technology.
Non-hardware revenue also increased. Sales from the app store, music subscriptions and other services grew 31 percent to $9.5 billion, a record for Apple. Apple Music subscribers exceeded 50 million. On the other hand, the company saw revenue declines in both the iPad and Mac computers.
"Apple is no longer a one-trick pony," said Daniel Morgan, a portfolio manager with Synovus Trust Company, citing higher iPhone prices, a growing cash hoard, and increased services revenue.
For the current quarter ending in September, Apple said it expects revenue in the range of $60 billion to $62 billion — also better than analysts had expected.
Wall Street had been concerned that President Donald Trump's tariffs against China, and the ensuing counter-tariffs, would hurt Apple, which makes aboutin the country. But Cook expressed optimism about the trade dispute on a call with investors, saying the first three rounds of tariffs didn't directly affect and that the company was evaluating the in China tariffs currently under consideration.
"We're optimistic that this will get sorted out," he said.
Apple shares have climbed 12 percent since the beginning of the year, while the S&P 500 index is up slightly more than 5 percent.
-- The Associated Press contributed to this report