Over the past five years, shares of Apple (AAPL -1.33%) have soared 218%, which translates to an annualized gain of 26%. That rise undoubtedly beats the gain of the Nasdaq Composite Index by a long shot. 

But shares are off about 11% from their all-time high price (as of Sept. 21), a move that came about after the business reported its fiscal 2023 third-quarter earnings. Perhaps investors aren't happy with softer sales trends. 

Regardless of what the latest numbers show, it's important to gain a better understanding of Apple. Here's one reason that this top FAANG stock is a no-brainer buy, as well as one reason that investors are better off avoiding it altogether. 

Superior products and services 

It might be a smart idea to only invest in businesses that sell the best products and services. Anyone who's an Apple customer would probably agree that this statement is accurate for this company.

Apple boasts a top-notch hardware lineup that includes the iPhone, which represented nearly half of overall company revenue in the most recent quarter (ended July 1), MacBook, Watch, AirPods, and iPad. Combined, these products account for 74% of Apple's sales. 

It's hard to understate the success of the iPhone. While it has a small share of shipment volumes, its pricing power allows it to command more than 80% of the operating profits in the smartphone industry. And analysts believe the newest upgrade cycle's demand is outpacing supply. 

Then there's the budding services segment, which houses valuable software offerings like Pay, TV+, iCloud, and Music. This segment only represents 26% of revenue, but it has generally grown faster than the hardware division, while also registering a much higher gross margin. 

Apple Pay's success is especially noteworthy. Since being introduced in 2014, it has become the second most widely accepted digital wallet at the top 1,500 retailers in North America and Europe, behind only PayPal. But the fintech giant was founded in 1998, so Apple Pay's rapid ascent is impressive. 

The combination of Apple's hardware and internally developed software is what creates a powerful ecosystem. It's what drives customer loyalty, reducing the chances that anyone makes the switch to Alphabet's Android or another competing smartphone operating system. 

The legendary Warren Buffett agrees. He argued that if you offered someone $10,000, with the only stipulation being that they couldn't use an iPhone again, they'd most likely turn down that deal. That stickiness exemplifies Apple's success. 

The price you pay for Apple matters 

I don't believe many investors argue with the outstanding quality of Apple's business, but that doesn't automatically make the stock a screaming buy. The question remains of just how much one is willing to pay for exposure to this dominant company in their portfolio. Therefore, a discussion about the valuation can't be ignored. 

After the stock's outperformance in recent years, it currently trades at a trailing price-to-earnings (P/E) ratio of 29.4. That's more expensive than Apple's trailing 10-year historical average of 20.3, and it represents a huge premium to the S&P 500. A higher valuation, all else being equal, diminishes the chances of higher returns going forward. 

Now, investors must ask if Apple's growth prospects justify that huge premium. And I don't think they do. Revenue has declined on a year-over-year basis in each of the last three quarters. This business is at a very mature stage of its lifecycle, so unless there is a game-changing new product on the horizon that can significantly move the needle on the top line, it's hard to have confidence that Apple can achieve double-digit revenue gains in the years ahead.  

To be fair, Apple has shown its ability to boost earnings at a faster clip than sales, a trend that's helped by the growth of the high-margin services segment. But at a P/E of almost 30, it's still asking investors to have a ton of optimism. 

The takeaway is that this is a fantastic business, and the current valuation accurately reflects this perspective.