Apple Inc. (NASDAQ:AAPL) stock made headlines today by becoming the first U.S. public company in history to achieve a market cap of $1 trillion, beating out would-be contenders like Amazon.com, Alphabet, and Microsoft. In order to reach this level, Apple has gained nearly 20% so far in 2018 after a 46% gain last year.

While it may be exciting to see Apple hit this milestone, it's important to remember that this particular watermark is completely arbitrary, and while watching the "race to $1 trillion" made for a bit of fun, it has nothing to do with the ongoing potential of the business. Let's look at the catalysts that precipitated Apple's recent rise and see what that means for its future prospects.

A close-up of $100 bills being printed.

Apple's worth $1 trillion. Now what? Image source: Getty Images.

How did we get here?

Several factors contributed to the company's historic feat. Apple's second-quarter financial report topped analysts' consensus estimates to start the trend. The company said it was "our best March quarter ever."

Apple investors had been downbeat following reports of weak demand for the company's flagship iPhone and weak financial results from Apple's suppliers. The company's surprisingly strong performance went a long way toward soothing shareholder doubts about its future. 

Additionally, Apple revealed a 16% boost to its dividend, the sixth such increase in as many years and the largest to date. This brings the company's payout to $0.73 quarterly per share, currently yielding about 1.57%. Its recent strong earnings mean that Apple still is using less than 25% of its profits to support the payout, so these annual increases will likely continue for the foreseeable future.

Investors in the iPhone maker were given another reason to celebrate, as the company announced a new $100 billion repurchase program, saying that its stock is "undervalued." Apple has a strong record of buying back stock, and has reduced its share count by nearly 22% over the past five years. At Apple's current price, the new buyback plan could reduce the share count by another 10%, giving each shareholder an even larger slice of the Apple pie.

 AAPL Shares Outstanding Chart

AAPL Shares Outstanding data by YCharts.

Apple wasn't alone in thinking that its stock was a bargain. Legendary investor and Berkshire Hathaway (NYSE: BRK-A) (NYSE: BRK-B) CEO Warren Buffett revealed in May that the company had purchased an additional 75 million Apple shares, bringing its total holdings to 240 million shares, owning about 5% of the company.

Investors tend to watch Buffett's purchases due to his laudable track record. Since 1965, the Oracle of Omaha has generated compound annual gains of 20.9% for Berkshire, more than double that of the broader market and producing overall stock-price gains of 2,404,748%. Those results show why investors do well to follow his example.

Still going strong

Apple's compelling results continued into the third quarter, with top and bottom line numbers coming in at the high end of Apple's forecast, beating analysts' consensus estimates in the process. More importantly, customers continued to opt for the higher-end products -- like the iPhone 8 and iPhone X -- increasing the average selling price for the devices to $724, up from $606 in the prior-year quarter. This drove revenue up 17% year over year, while earnings per share jumped 40% compared to the prior-year quarter.

Meanwhile, Apple has been growing its other businesses to reduce its reliance on the iPhone. The company's services segment is becoming an increasingly important part of the company's strategy. Sales from the services business grew 31% year over year and accounted for 18% of Apple's revenue in the third quarter. The company's other products segment -- which includes Apple Watch, HomePod, Beats, and AirPods -- is also booming, growing 37% year over year, and it now represents 7% of Apple's revenue.

What this means for the future

It turns out that the same things that propelled Apple's shares to these historic heights are the very things that continue to make the stock a compelling investment. Apple has continued to produce strong financial results, a noteworthy feat for an entity of its size.

The company has demonstrated its ability to generate strong revenue, income, and free cash flow. This will continue to support the company's strong capital-return policy, which has been accelerating, and that likely will continue for years to come.

Editor's note: This article has been updated to say that Apple was the first U.S. company to achieve a market cap of $1 trillion. 

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Suzanne Frey, an executive at Alphabet, is a member of The Motley Fool's board of directors. Teresa Kersten is an employee of LinkedIn and is a member of The Motley Fool's board of directors. LinkedIn is owned by Microsoft. Danny Vena owns shares of Alphabet (A shares), Amazon, and Apple. The Motley Fool owns shares of and recommends Alphabet (A and C shares), Amazon, and Apple. The Motley Fool has the following options: long January 2020 $150 calls on Apple and short January 2020 $155 calls on Apple. The Motley Fool recommends Berkshire Hathaway (B shares). The Motley Fool has a disclosure policy.