Warren Buffett is one of the most closely followed investors of all time. Known as the Oracle of Omaha, Buffett's investment strategy has become a template for people looking to create and preserve wealth.

Buffett spent decades studying well-capitalized businesses that generate strong cash flow and use excess profits to reward shareholders. These are qualities that are not typically associated with high-growth technology businesses that burn money. Hence, Buffett avoided the sector for quite some time.

But in 2016, Buffett shocked Wall Street after he took a sizable position in Apple (AAPL 1.34%). What was initially considered a head-scratcher has ballooned into his largest position, currently representing just over 50% of Berkshire Hathaway's investment portfolio. Although he has been a repeat buyer of the stock, the real reason for Apple's top-ranking is its price appreciation over the years.

Let's dig into Apple's business and assess if the "Magnificent Seven" stock is worth a position in your portfolio.

Apple's revenue is declining...

Apple is one of the most innovative companies in history, creating everyday devices such as the iPhone and iPod. For this reason, the company is one of the most recognized brands in the world. For years, Apple generated eye-popping revenue and profit growth, earning cheers from investors and sending the stock shooting higher.

However, like many businesses, Apple reached a maturing point in its corporate lifecycle and the business results reflect this dynamic. A tough macroeconomy plagued by inflation and high borrowing costs has taken a toll on consumer demand for luxury products, thereby stifling Apple's revenue. The chart below illustrates the company's sales over the past decade.

AAPL Revenue (Quarterly) Chart

AAPL Revenue (Quarterly) data by YCharts

While consumer businesses tend to ebb and flow, the obvious theme here is that Apple's top line is no longer accelerating. Some investors may fear that Apple's best days are behind it and believe exiting the stock for new growth opportunities is the most prudent move. While this view has merit, there is more to consider with Apple than just its revenue patterns.

A person looking at their cell phone.

Image source: Getty Images.

...but profits are growing

Although Apple is struggling to grow its overall revenue, investors should keep in mind that the company derives sales from more than just hardware devices. Apple splits its revenue into five categories: iPhone, iPad, Mac, wearables, and services. Each of these revenue streams declined in fiscal 2023, ended Sept. 30, except for the highly profitable services operation.

AAPL Gross Profit Margin (Quarterly) Chart

AAPL Gross Profit Margin (Quarterly) data by YCharts

The chart above illustrates Apple's gross margin profile over the past 10 years. Even though the company has faced some headwinds from a revenue perspective, the trend above shows just how powerfully the underlying business is really performing.

The company has been able to expand its profits on a consistent basis thanks to a robust services business that boasts roughly 70% gross margins. This stunning margin expansion has fueled hundreds of billions in free cash flow over the years, bolstering the company's balance sheet. The company has found some creative ways to allocate capital, such as consistently repurchasing stock.

AAPL Stock Buyback (Annual) Chart

AAPL Stock Buyback (Annual) data by YCharts

Best recipe: Patience, discipline, and long-term thinking

All of the Magnificent Seven stocks are focusing in on artificial intelligence (AI) in some capacity. While AI represents a new growth frontier, it's a costly endeavor. For this reason, many businesses investing in AI do not have the flexibility to provide more direct rewards such as dividends or stock buybacks.

Not only does Apple do both of these. Apple is notorious for playing coy, often keeping a tight lid on new product development and surprising the public. Given the company's massive ecosystem, stitched together by a fiercely loyal customer base, I think it's only a matter of time before Apple's AI roadmap is revealed.

At a forward price-to-earnings (P/E) multiple of 29.5, Apple stock ranks third-lowest among its "Magnificent Seven" peers. I think this says a lot about how the markets are viewing Buffett's top holding. Clearly, investors are souring on the stock due to revenue deceleration and an unclear AI vision at the surface level. But to me, history points to one core theme: Apple consistently performs at a high level.

I think that as inflation cools, the clouds shading the economy will begin to clear and Apple will find itself in a unique position returning to top-line growth. This should augment the overall margin profile of the business and help sustain cash-flow generation. Moreover, in due time Apple's role in artificial intelligence should begin to take shape. Now looks like a good opportunity to take advantage of market dynamics and scoop up some shares in this underappreciated and misunderstood stock.