At a monstrous $3.2 trillion market cap, Apple (AAPL 0.40%) is currently the second-most valuable business on the face of the planet. This was propelled more recently by a stock price that has soared 62% in just the last three years (as of June 21), a gain that more than doubles the rise of the Nasdaq Composite Index.

Apple is a dominant company with many compelling qualities. But where will this "Magnificent Seven" stock be in three years?

All about the iPhone

Even though it's been 17 years since the introduction of the iPhone, arguably the most successful hardware launch in the history of business, this product line is still incredibly important to Apple's success. During the second quarter of 2024 (ended March 30), iPhone sales represented 51% of the company's total sales.

I don't think there's any reason to believe that this will change anytime soon. It is expected that Apple will launch the 16th edition of iPhone models in the fall of this year, with newer iterations continuing in the years ahead. Consequently, this is still very much going to be a hardware company three years from now.

Of course, Apple sells other popular products as well. There's the iPad, Mac computers, AirPods, and Watch that consumers seem to love. Rumors were swirling for the longest time that the business would eventually introduce an electric vehicle. But it was reported earlier this year that the project was abandoned. If Apple had followed through, a car might have been the one product and industry that could've truly moved the needle financially.

Importance of software and services

In recent years, Apple's revenue mix has shifted away from hardware. After services sales rose 14.2% in Q2, they accounted for 26.3% of the company's total. This segment includes various offerings like Apple Pay, TV+, Music, and the App Store, for example.

Apple is already hugely profitable. Its operating margin has averaged 28.1% in the past five years, which any business would love to have. As we look ahead, the bottom line could expand. Services carry a fantastic gross margin of 74.6%, much higher than the products' 36.6%. As more revenue comes from services, Apple's profitability could get a boost.

Those services have become increasingly important to Apple's financial situation. And they help create the company's powerful ecosystem. However, moving forward, the bulls hope that artificial intelligence (AI) can play a bigger role. Apple wants to harness this technology to make its hardware products, particularly the iPhone, even more useful for consumers.

Setting our sights on 2027, Apple is poised to remain a leader on the software side of things. Whether AI initiatives can drive greater device sales is yet to be determined, however.

Will investors be rewarded?

The beautiful marriage of hardware and software has made Apple into the tech juggernaut that it is today. And throughout its history, shareholders have been rewarded with tremendous returns.

Looking out over the next three years, will investors continue to register market-beating gains?

To get straight to the point, I'm not confident that this trend will continue -- a main reason being the stock's expensive valuation. It trades at a steep price-to-earnings (P/E) ratio of 32.9. This goes to show you the market's enthusiasm for Apple stock, which eliminates any margin of safety.

Paying that high of a P/E would be totally fine if Apple were set to post strong revenue growth. This doesn't seem to be the case. According to Wall Street consensus analyst estimates, the business is expected to increase sales by just 5% per year between fiscal 2023 and fiscal 2026.

A high valuation, coupled with muted growth prospects, creates a terrible recipe for investors looking at Apple stock.