Apple's figures also reflect increasing demand for products including Apple Watch, once considered a weak offering, but which sold around 3.5m units during the quarter, an increase of 30% year on year-on-year.
Apple beat sales estimates in part by selling fewer but pricier iPhones than analysts expected.
Investors reacted enthusiastically, driving the stock up 5% in after-hours trading to $195.90 a share.
iOS 12 Beta Reveals 2018 iPhones May Finally Get Dual-SIM Support
The firm said it sold 41.3 million iPhones in the three months to the end of June, up just 1% from previous year. Apple Chief Financial Officer Luca Maestri told Reuters that customers were buying costlier models and the $999 iPhone X was the quarter's best seller.
In fact, as the Apple-centric Six Colors blog pointed out, Apple's four-quarter rolling iPhone revenue is at an all-time peak, beating out even that late 2015/early 2016 period when seemingly everyone was upgrading to an iPhone 6.
Sales of iPhones in the fiscal third quarter have typically been tame as many fans have historically either bought handsets in prior months or end up waiting for new models in the months to come.
"Apple gave the Street and tech investors finally some good news" beating earnings forecasts and predicting the current quarter will be strong, GBH insights head of technology research Daniel Ives said in a note to investors.
States Move to Stop Website From Posting 3D-Printed Gun Files
The lawsuit states that "among these controls are criminal laws, including the Pennsylvania Uniform Firearms Act". He said the settlement also violated states' rights to regulate firearms.
While Apple missed estimates on iPhone sales, services brought in a surprising $9.5 billion in revenue, gaining 31% over the year-earlier quarter.
Apple's guidance for the fourth quarter of fiscal 2018 includes expected revenue of $60-62 billion and gross margin between 38 and 38.5 percent. Supply chain leaks suggest the company is preparing to launch a bigger-screen version of the iPhone X as well as a cheaper model.
Apple has repeatedly highlighted the growing amount of money it is taking in from music, applications, games, subscriptions and services it sells to people using its devices.
Gross margin for the quarter was 38.3 percent compared to 38.5 percent in the year-ago quarter, with global sales accounting for 60 percent of revenue. Bloomberg reported that one reason for the high revenue is that Apple has been able to keep the average selling price of the iPhone above $700 for the third quarter running.
Disappointment for relatives as long-awaited investigation into MH370 proves inconclusive
The captain was a "very competent pilot" with an "almost flawless safety record" and there were no known defects with the plane. The report found no signs that the plane was evading radar detection or that it had been taken over by remote control.
At the moment, Apple is worth $935 billion. Analysts expected revenue of US$52.4 billion and earnings of US$2.18 a share.
Apple sold 41.3 million iPhones, 11.553 million iPads, and 3.72 million Macs in the quarter. iPhone sales were up 1% year over year but revenue from iPhone was up 20%.
Apple, meanwhile, has focused more on services such as the App Store and its entertainment businesses as growth drivers.
The maker of iPhones, iPads and other products posted revenue of nearly $53.3 billion in the period, also exceeding Wall Street forecasts.
Trump Breaks Tradition on GDP Figures
The president called the 4.1 percent rate "amazing" and said , "As the trade deals come in one by one, we're going to go higher". President Donald Trump speaks on trade at Granite City Works Steel Coil Warehouse, Thursday, July 26, 2018, Granite City, Ill.
Despite the trade war, China remains one of Apple's best markets, posting double-digit revenue growth in the country for the fourth quarter in a row, Cook said.