Apple (AAPL 0.75%) and Alphabet (GOOG 0.20%) (GOOGL 0.16%) are two of the world's top tech companies. They're also two of the "Magnificent Seven" stocks, which account for nearly 30% of the S&P 500's market capitalization.

But this year, Apple's stock declined 9% as investors fretted over its competitive, macro, and regulatory challenges. Alphabet's stock advanced 14% even as its advertising business cooled off and it suffered a major setback in the AI race. Will Alphabet continue to shake off the bears and outperform Apple this year?

An investor checks a smartphone while working in front of a computer.

Image source: Getty Images.

Why are investors giving up on Apple?

In fiscal 2023 (which ended last September), Apple's revenue declined 3% as its earnings per share (EPS) stayed nearly flat. Its iPhone sales -- which accounted for over half of its top line -- fell 2% as the 5G upgrade cycle ended, macro headwinds curbed consumer spending, and it grappled with currency headwinds. Mac sales plunged 27% amid the personal computing market's recent decline. Its sales of iPads, wearables, home products, and accessories also dipped.

Apple's services revenue -- which accounted for over a fifth of its top line -- rose 9% for the year as it locked in more than 1 billion paid subscribers across its ecosystem, but that growth couldn't offset the weakness of its hardware businesses.

For fiscal 2024, analysts expect Apple's revenue and earnings to only rise 1% and 7%, respectively, as its hardware business grows at a sluggish pace. But those estimates could still be too optimistic in light of Apple's recent challenges.

According to Counterpoint Research, Apple's iPhone sales dropped 24% year over year in China in the first six weeks of calendar 2024 as it ceded the market to aggressive domestic competitors like Huawei. The Vision Pro also remains a pricey niche gadget for early adopters, and it recently scrapped its electric vehicle plans after pouring billions of dollars into the project over the past decade.

On the regulatory front, Europe's antitrust regulators are challenging Apple's App Store policies which prevent companies from directing consumers toward cheaper payment options outside its walled garden. The U.S. Department of Justice also recently sued Apple for hobbling and blocking third-party apps which compete against its own first-party services. Both of these cases could reduce the stickiness of Apple's ecosystem and throttle its service revenues.

Apple reportedly plans to upgrade its own Siri and Spotlight tools with new generative AI features, but that seems like a knee-jerk reaction to Microsoft and Google's latest moves instead of a meaningful growth strategy.

Apple ended its latest quarter with $173 billion in cash and marketable securities, so it still has plenty of room to expand through investments and acquisitions, but it's plowing a lot of its cash into big buybacks. That might make sense if its stock were undervalued, but it doesn't seem like a bargain right now at 27 times forward earnings.

Why are investors warming up to Alphabet?

In 2023, Alphabet's revenue and EPS rose 9% and 27%, respectively. It generated most of its revenue from Google's advertising ecosystem (including its search engine, ad network, and YouTube), but that core business only generated 6% revenue growth for the full year as it grappled with macro, competitive, and regulatory challenges.

Rising interest rates and other macro headwinds are driving many companies to rein in their marketing expenses, and tough competitors like Meta Platforms' Reels and ByteDance's TikTok are exacerbating that pressure. On the regulatory front, Google still faces antitrust probes and fines across the U.S., Europe, and other markets regarding its search engine's market dominance and its data mining practices.

Alphabet previously relied on Google Cloud's expansion to offset the slower growth of its advertising business, but that secondary growth engine is cooling off. Google Cloud's revenue still rose 26% in 2023, but that marked a slowdown from its 36% growth in 2022. It ranks a distant third in the cloud infrastructure race behind Amazon Web Services (AWS) and Microsoft Azure, which have both been rolling out new generative AI tools across their ecosystems.

Google's own generative AI efforts suffered a major setback this year when its Gemini chatbot started to generate historically inaccurate images and biased responses to text-based queries. It subsequently suspended its image-generating abilities to rectify those issues, but that blunder suggested that it was falling behind its rivals in the AI race.

But for 2024, analysts still expect Alphabet's revenue and earnings to rise 11% and 17%, respectively, as Google's advertising business warms up again. Alphabet was also sitting on $111 billion in cash, cash equivalents, and marketable securities at the end of 2023, and it's been pouring a lot of its cash into big buybacks over the past few years.

Alphabet still needs to overcome a lot of near-term challenges to stabilize its advertising and cloud businesses. But at 23 times forward earnings, its stock looks cheaper than Apple's relative to its near-term growth.

The better buy: Alphabet

Apple and Alphabet both have obvious flaws. However, Alphabet's broader diversification, lower dependence on cyclical hardware devices, higher growth rates, and cheaper multiple all make it a more attractive Magnificent Seven bet than Apple.