Apple rose to a record high in morning trade Friday, nearly giving the company a valuation of over $900 billion for the first time.

Shares were briefly up more than 3 percent at the opening bell on Friday, after the company reported earnings that blew past Wall Street expectations on Thursday night. Around the world overnight, thousands lined up outside Apple Stores, hoping to buy Apple's new flagship phone, the freshly launched iPhone X.

By midmorning, the stock was up about 2 percent, giving the company a valuation of $868 billion.

Apple's 10th-anniversary handset represents a significant upgrade from past phones, with features like a bright, edge-to-edge screen, facial recognition with animated emojis, no home button and a glass and steel chassis.

But the fervor around the iPhone X did not stop Apple from making more money than expected over the last three months — despite worries on Wall Street that consumers would hang back in anticipation.

The iPhone 8 and iPhone 8 Plus "instantly" became Apple's top-two selling products at launch, surprising even executives, chief executive Tim Cook said on a conference call. And it doesn't expect to slow down: Revenue guidance for next quarter was also on the high end of estimates.

"You can see from our guidance, we're very bullish," Cook said on a Thursday night conference call.

Part of Apple's valuation reflects investors' future expectations of the company. Apple executives have expressed high hopes for rapid growth in software and services, in the booming middle classes in China and India, and in the tantalizing prospect of tax reform.

Apple's mound of cash and cash equivalents continued to scrape the cloudline this quarter, coming in at $268.9 billion in the company's quarterly earnings report.