Trillion Dollar Baby.

Apple Inc. (AAPL) - Get Report shares opened at a record high Wednesday, boosting the value of the world's biggest tech company to more than $970 billion, following forecast-busting third quarter earnings and a robust outlook for sales heading into the second half of the year.

Apple shifted 41.3 million iPhones in the three months ending in June, the company's fiscal third quarter, a figure that fell modestly shy of analysts' forecasts but was more than offset by a boost to the average selling price of each unit, which rose to $724 thanks to the $1,000 iPhone X, which the company said had record sales. That helped drive revenues to $53.3 billion, just ahead of forecasts, and lift the group's bottom line to $2.34 a share, a figure that was well ahead of the Street forecast of $2.18. Apple also said it sees current quarter revenues to come in as high as $62 billion, as it rolls out new iPhone models ahead of the holiday shopping season.

"Looking ahead, we couldn't be more excited about the products and services in our pipeline as well as limitless applications for augmented reality and machine learning technology," Apple CEO Tim Cook told investors on a conference call late Tuesday. "We're working with key partners in the enterprise to change the way work gets done with iOS and Mac. We're welcoming communities and offering learning opportunities at our retail locations through hundreds of thousands of Today at Apple sessions each quarter."

"We're expanding our reach into emerging markets and seeing strong double-digit growth in revenue and we're making great progress toward our goal of significantly expanding our services business," he added. 

Action Alerts Plus holding Apple shares rose $8.22, or 4.32%, to $198.51 as trading opened in New York Wednesday, taking its year-to-date gain to more than 17% and valuing the Cupertino, Calif.-based group to more than $970 billion. Apple shares would need to rise to $206.49 in order to become the first listed company -- anywhere in the word -- to reach a market valuation of $1 trillion.

Apple said the iPhone X had record sales over the quarter, defying critics that suggested its $999 price tag would put off new customers, and helped lift the average selling price of smartphones by 19.5% from the same period last year to $724 each, a figure that topped FactSet compiled forecasts by $30.

"The iPhone X in particular (is) the most innovative smartphone on the market," Cook told investors. "We priced it at a level that represented the value of it and we could not be happier that it has been the top selling iPhone since the launch, and so we feel terrific about iPhone X."

Apple also noted that its third quarter numbers were boosted by strong performances in the group's services sector, which includes Apple Music, iCloud, and Apple Pay, with revenues rising 31.3% from the same period last year to $9.55 billion. That's nearly double the 17% group revenue gain and marks what could be a turning point in the company's overall earnings forecast as customers potentially gravitate away from expensive smartphones.

In fact, Apple is now the world's third largest smartphone maker, with a 12% market share, falling behind China's Huawei Technologies at 15% and Samsung Electronics at 20%, according to figures published Wednesday by IHS and Strategy Analytics.

"In terms of our installed base, which is something very important for us as it is one of the key drivers of services, our active installed base on iPhone grew double digits over last year during the quarter and so we're thrilled with that and you can see that carrying through to the services line and the growth that we had there," Cook said.