Apple today disclosed that it produced a $17.8 billion profit, or $3.36 in earnings per diluted share, on $78.35 billion in sales in the first quarter of its 2017 fiscal year, which ended on December 31. Analysts were expecting an average of $3.22 in earnings per share on $77.38 billion in revenue.

In October Apple itself estimated that it would come in with $76-78 billion in revenue. The actual revenue result is an “all-time record,” Apple said in a statement. That derives from record iPhone revenue and unit sales, but also record revenue and unit sales for the Apple Watch, along with a new revenue record from the burgeoning Services business, chief executive Tim Cook said on today’s conference call with investors.

This time last year, after wrapping up the 2015 holiday season, Apple posted the biggest profit for a single quarter ever: $18.4 billion. But in each of the three quarters following that, Apple saw revenue decline year over year.

Today, Apple’s earnings are riding on the iPhone 7 and 7 Plus that were unveiled in September. While dual cameras and water resistance did distinguish the new models from their predecessors, they bore resemblance to the iPhone 6 and 6 Plus and 6S and 6S Plus; now consumers are looking toward a major revamp for the iPhone’s 10-year anniversary this coming September.

And yet, iPhone unit sales for the past quarter were 78.29 million, which is up 5 percent year over year. That translates to $54.37 billion in sales for the iPhone in the quarter.

The average selling price (ASP) of the iPhone for the quarter was a record-high $695, pointing to the popularity of the iPhone 7 Plus, which starts at $769 (the iPhone 7 starts at $649).

Apple sold 13.08 million iPads in the quarter, which is down 19 percent year over year. Revenue for the iPad was down 22 percent year to year.

Besides iPhone 7 sales, the other notable thing in this quarter is the introduction of the next-generation MacBook Pro, with its Touch Bar secondary display. Apple sold 5.37 million Macs in the quarter, up from 5.31 million one year earlier, contributing $7.24 billion in revenue, up 7 percent year to year.

Services revenue of $7.17 billion was up 18 percent year to year. (There was “record activity” on the App Store, Cook said.) Apple’s Other Products category, which includes the newly unveiled AirPods wireless headphones as well as the Apple Watch, came in at $4.02 billion in revenue, which was down 8 percent. Apple once again did not say exactly how many Watches were sold in the quarter.

Revenue from greater China was down 12 percent year to year, at $16.23 billion. But revenue from the Americas, at $31.96 billion, was up 9 percent. Revenue from Europe, which came in at $18.52 billion, was up slightly — 3 percent.

The company spent $2.87 billion on research and development, which is up from $2.4 billion one year earlier.

Apple believes it will register $51.5-53.5 billion in revenue in the second quarter of its 2017 fiscal year, which will end in late March.

Apple stock was up more than 2 percent in after-hours trading following the earnings beat.