Apple (AAPL 0.41%) and Alibaba (BABA -2.70%) are both often considered stable blue-chip plays for long-term investors. Apple's iPhone dominates the premium smartphone market, and its other hardware devices and sticky software services continuously lock in its customers. Alibaba is China's largest e-commerce and cloud company, and it also owns one of the country's largest streaming video platforms.

But over the past six months, Apple's stock dipped 4% as Alibaba's stock dropped 9%. Let's see why these two stalwarts floundered, and if either stock is worth buying right now.

Apple's Vision Pro headset.

Image source: Apple.

What happened to Apple?

Apple is still overwhelmingly dependent on the iPhone, which accounted for 52% of its revenue in fiscal 2023 (which ended last September). Its iPhone sales declined 2% during the year as the 5G upgrade cycle ended, and that slowdown was exacerbated by its plunging sales of Macs in a post-pandemic market and tough currency headwinds.

As a result, Apple's revenue dipped 3% as its earnings per share (EPS) stayed nearly flat. It tread water by repurchasing $77.6 billion in shares throughout the year, but analysts expect the market's demand for its iPhones to remain tepid this year. Analysts expect its revenue and earnings to rise 4% and 8%, respectively, in fiscal 2024, but those growth rates are arguably low for a stock that trades at 28 times forward earnings.

On the bright side, Apple still ended the year with over $162 billion in cash and marketable securities, which gives it plenty of room to expand through new investments and acquisitions. It also exceeded a billion paid subscriptions across all of its services, which was nearly double the number it had just three years ago.

That expanding ecosystem should lock in its customers. Its planned launch of the Vision Pro headset this year could also diversify its hardware business and give it a foothold in the nascent augmented reality (AR) and virtual reality (VR) markets.

Apple still has a lot of irons in the fire, but its lack of visible near-term catalysts and stretched valuations seem to be weighing down its stock. Nevertheless, Warren Buffett is still committed to keeping nearly half of Berkshire Hathaway's portfolio in Apple -- so it might still be a long-term winner.

What happened to Alibaba?

Buffett's longtime business partner, the late Charlie Munger, invested heavily in Alibaba through the Daily Journal in 2021. However, Munger eventually reduced that stake, and called it one of the "worst mistakes" of his career. Munger, like many other value-seeking investors, was initially drawn to Alibaba's low valuations. Unfortunately, Alibaba's stock became dirt cheap for three obvious reasons.

First, China's antitrust regulators hit Alibaba with a record fine of $2.8 billion in September 2021 and forced it to end its exclusive deals with merchants, ease off its aggressive promotions, and request government approvals for its future acquisitions. Those new restrictions eroded Alibaba's defenses against JD.com, PDD Holdings, and other formidable e-commerce competitors.

Second, China's economy cooled off as the macro headwinds intensified. That slowdown was exacerbated by the country's draconian COVID-19 lockdowns throughout 2021 and 2022.

Lastly, the macro headwinds throttled the growth of its cloud business as companies reined in their software spending. That's why Alibaba's revenue rose a mere 2% in fiscal 2023 (which ended last March) as its adjusted earnings per ADS grew 4%.

But looking ahead, analysts expect Alibaba's revenue and adjusted earnings to grow 11% and 22%, respectively, in fiscal 2024 as China's macro environment stabilizes. However, the recent departure of its longtime CEO, its confusing restructuring plans (which might lead to spin-offs and IPOs for its individual business units), and intense competition from PDD in China suggest its high-growth days are over. On the other hand, Alibaba still repurchased $15.7 billion in ADR shares throughout fiscal 2023 and the first half of fiscal 2024, and its low forward P/E multiple of 8 might just set a floor under its stock.

The better buy: Apple

Alibaba looks cheap relative to its growth potential, but its future is still murky and the delisting threats for U.S.-listed Chinese stocks could depress its valuations for the foreseeable future. The tightening restrictions for AI chip sales to China could also disrupt the expansion of its cloud infrastructure platform.

Apple's stock might remain out of favor in this tough market, but its stable growth, expanding ecosystem, and massive war chest arguably make it a better buy than Alibaba, which still needs to overcome some tough macro, competitive, and regulatory challenges before it can be considered an undervalued growth stock again.