Nvidia (NVDA -2.27%) and Meta Platforms (META -1.00%) are both well poised to profit from the secular expansion of the AI market. Many large tech companies, including Meta, install Nvidia's top-tier graphics processing units (GPUs) in their data centers to process complex machine learning and AI tasks.

For Meta, Nvidia's chips make it easier to craft targeted ads, make recommendations, learn languages, and identify harmful content. At other companies, they can be used to automate tasks, identify business trends, and make data-driven decisions. Nvidia's A100 chip also powers "generative AI" platforms -- including ChatGPT, Bing AI, and Stable Diffusion -- which are trained on existing information to create new content. 

A digital illustration of a brain hovering over a motherboard.

Image source: Getty Images.

Nvidia and Meta both lost their luster in 2022 as rising interest rates pummeled the tech sector. But this year, Nvidia and Meta have risen about 60% and 40%, respectively, as the rise of ChatGPT and other AI services drove investors back toward AI-related stocks. Should investors buy either of these recovering tech stocks right now?

Nvidia is still in the middle of a cyclical slowdown

Nvidia's growth accelerated throughout the pandemic as more people upgraded their PCs to play video games, work online, attend remote classes, and mine cryptocurrencies. Its sales of data center chips also surged as companies upgraded their servers to address the rising usage of cloud-based services. That's why the chipmaker's revenue and adjusted earnings per share (EPS) soared 61% and 78%, respectively, in fiscal 2022 (which ended in January 2022).

But those tailwinds quickly dissipated in a post-pandemic market. Sales of new PCs withered as the lockdowns ended, while macroheadwinds forced companies to rein in their spending on big cloud and data center deals. The collapse of the cryptocurrency market exacerbated that pain as miners flooded the market with their used GPUs. As a result, Nvidia's revenue remained roughly flat in fiscal 2023 as its adjusted EPS declined 25%. Its revenue also declined year over year in the third and fourth quarters, and it expects to experience another decline in the first quarter of fiscal 2024.

But on a sequential basis, Nvidia's gaming and data center businesses -- which together accounted for 90% of its revenue last quarter -- are both stabilizing. It expects the gaming business to stabilize as it resolves its inventory issues and the Chinese market recovers, and for the rise of generative AI services to boost sales of its data center chips. For the full year, analysts expect Nvidia's revenue and adjusted EPS to increase 10% and 33%, respectively, as its cyclical decline finally ends.

Meta faces tougher existential challenges

Meta stumbled last year as four major challenges throttled its growth. First, Apple's (AAPL 1.17%) privacy changes on iOS -- which enabled users to opt out of data-tracking features -- made it difficult for Facebook and Instagram to craft targeted ads. Second, intense competition from ByteDance's TikTok further reduced its ad sales and forced it to ramp up its investments in its Reels short videos, which are more difficult to monetize than its News Feed ads.

Third, the macroeconomic headwinds forced many companies to curb their ad spending. That was bad news for Meta, which generated 97% of its revenue from ads in 2022 and other ad-dependent companies. Lastly, Meta remained firmly committed to expanding its money-losing Reality Labs business with new virtual reality devices and services. That segment posted an operating loss of $13.7 billion in 2022 while only generating $2.2 billion in revenues.

That's why Meta's revenue and EPS declined 1% and 38%, respectively, in 2022. However, analysts expect its revenue and EPS to increase 5% and 11%, respectively, this year as its advertising business stabilizes, and it reins in its spending to offset the Reality Labs' segment's persistent losses. It already laid off 13% of its workforce last November, and it's reportedly gearing up for another round of layoffs this year. As Meta streamlines its business, it will focus on improving its first-party data capabilities to offset Apple's platform changes and expanding Reels to counter TikTok.

The valuations and verdict

Nvidia trades at 49 times forward earnings, while Meta has a much lower forward price-to-earnings (P/E) ratio of 18. Nvidia is still trading at a premium to many of its peers because it dominates the discrete GPU market and has a clear path toward a long-term recovery. Meta is trading at a discount to many other tech companies because its problems with Apple, ByteDance, and Reality Labs represent existential challenges instead of cyclical ones. The social networking giant still served a whopping 3.7 billion people each month across its entire family of apps (Facebook, Messenger, Instagram, and WhatsApp), but it's unclear if it can continue to effectively monetize those users as the advertising market evolves.

Meta faces a tougher uphill battle than Nvidia this year, but I believe its lower valuation makes it the more compelling buy right now. Nvidia's long-term prospects look bright, but its valuations have clearly been inflated by the market hype surrounding ChatGPT and other generative AI services. Therefore, investors should wait for Nvidia to cool off before pulling the trigger, but they can still consider investing in Meta as a value play.