There have been few better stocks to own than Nvidia (NVDA -0.03%) and Meta Platforms (META -0.19%) in 2023, as each is up over 80% since 2023 began. That's far better than third-place performer Align Technology, which is up an impressive 65%, but still not as good as the other two.

With such incredible performance, investors might wonder if these two still make for good buys now. Let's look at these companies and what has driven their outperformance, then see if you can still buy their stocks at reasonable prices.

Both stocks entered the year at a low base

If we're discussing how great these stocks have been in 2023, we must talk about how terrible they were in 2022.

META Chart

META data by YCharts

With both stocks falling at least 50% in 2022, they entered 2023 with fairly low expectations.

For Meta Platforms (formerly known as Facebook), investors were worried about stagnant revenue and falling profits caused by increased operating expenses, which rose 29% in 2022 while profits tumbled 39%. Many feared that CEO and founder Mark Zuckerberg was too fixated on the metaverse and was ruining his company to chase a pipe dream.

But all that changed when he dubbed 2023 the "year of efficiency." Through multiple layoffs, canceling low-priority projects, and reducing Meta's hiring rate, it's clear Zuckerberg is executing his efficiency vision. Still, all investors have are press releases about these shakeups, not actual financial results.

We'll see the new Meta Platforms on April 26 when it reports Q1 results. Even without that information, investors have bid the stock price up significantly, as its price-to-earnings (P/E) ratio has returned to its historical average.

META PE Ratio Chart

META PE Ratio data by YCharts

However, when we last heard from Meta, it wasn't optimized for profits, which skews the P/E ratio. Looking at its price-to-sales (P/S) ratio, Meta still has a long way to go before returning to its average valuation, although that valuation was achieved when Meta Platforms was still rapidly growing.

At these prices, I'd say Meta's stock is reasonably priced. It entered 2023 undervalued, but after this run-up, it's no longer a bargain, although you likely won't get burned for purchasing the stock here.

Unfortunately, that's exactly what would happen if you bought Nvidia's stock at these prices.

Nvidia's stock has run up too far, too fast

Nvidia's demise was caused by demand evaporation in its gaming segment due to a weak consumer and a crypto market downturn. Nvidia's gaming GPUs (graphics processing units) can be used to mine crypto, and without a separate product line specifically geared toward miners, management lost sight of how many GPUs were being bought by this cohort.

When the crypto market crashed, many miners sold their GPUs, which flooded the second hand market with cheap, powerful GPUs. As a result, Nvidia's gaming sales suffered significantly as other users scooped these GPUs up at a discount.

Chart showing Nvidia's falling gaming revenue.

Image source: Nvidia. Note: Revenue only includes the gaming segment.

Because gaming is Nvidia's second-largest segment, overall revenue fell by 21% in Q4 FY 2023 (ending Jan. 29, 2023), and net income plummeted by 53%.

However, a new catalyst provided a massive kick-start to Nvidia's stock in 2023.

Artificial intelligence (AI) has become the hottest investment theme in the market, and Nvidia is a primary benefactor of this trend. GPUs are used to train and run AI models, so the idea is that Nvidia's hardware will see a demand boost. The problem with this thesis is that AI isn't a new thing, and many companies have already purchased their computing capacity to train AI models (because how else would they have created them for the public to see without GPUs in the first place?).

That's not to say Nvidia won't see a slight demand boost as the AI arms race kicks off; it's just that it won't be as dramatic as everyone thinks.

As a result, Nvidia's valuation has reached absurd levels.

NVDA PE Ratio Chart

NVDA PE Ratio data by YCharts

With the stock trading around a localized peak valuation, it is approaching where it was when the bottom fell out of it at the end of 2022, so it's not a safe time to be an Nvidia investor. While Nvidia's long-term tailwinds are quite strong, now might be an excellent time to take some of the 2023 gains and reinvest them into more reasonably valued companies. While I don't think outright selling a position is prudent, rebalancing may be wise.