The "Magnificent Seven" stocks are a group of megacap technology companies that have thrived over the past few years and led this new bull market, but it's not been a smooth ride for every member of that group.

Two key members, iPhone maker Apple (AAPL -0.35%) and artificial intelligence (AI) chip company Nvidia (NVDA 6.18%), are moving in opposite directions so far in 2024. Apple's stock price has fallen 10% since January, while Nvidia's has risen over 80%.

So, which one of these two stocks is the better buy going forward?

Why Apple has fallen

2024 hasn't been kind to the personal electronics giant. The iPhone maker has fallen more than 10% since January. Why? It's most likely due to declining growth expectations. Apple's revenue growth has slowed significantly, which analysts expect will trickle down to slower earnings growth.

Additionally, word out of China is that iPhone sales there are slipping. According to research by Counterpoint, iPhone sales were down 24% year over year in China through the first six weeks of the year, as consumers pass on iPhones for Chinese alternatives.

AAPL Revenue (TTM) Chart

AAPL Revenue (TTM) data by YCharts

Now, Apple is still a marvelous company. Investing legend Warren Buffett has called it the best business his holding company, Berkshire Hathaway, owns. Apple makes up over 40% of Berkshire's $363 billion stock portfolio. However, it is understandable that Apple faces questions about its long-term growth. Growing isn't always easy for a massive $2.6 trillion company.

Why Nvidia has risen

On the other hand, Nvidia has been growing shockingly fast. The company is benefiting from a surge of investments related to AI. Nvidia's AI chips are today's dominant market leader, with an estimated 80% market share. That's shown up in fascinating financial results that have seen Nvidia's revenue and profits go parabolic, launching the stock higher in the process.

The big question is whether this is a burst or a prolonged trend. Lisa Su, the CEO of Nvidia's competitor, Advanced Micro Devices, believes the AI chip market will grow to hundreds of billions of dollars over the next few years. Considering Nvidia's companywide revenue is still "just" $61 billion as the market leader, there's a lot of potential upside if this prediction comes true.

NVDA Revenue (TTM) Chart

NVDA Revenue (TTM) data by YCharts

Investors might be understandably shy toward a stock that has risen so much so fast. However, the fundamentals have (so far) seemingly justified Nvidia's price action. That doesn't mean there aren't risks. For starters, Nvidia does tons of business with relatively few deep-pocketed customers. Losing any of them could put a big dent in revenue. It remains to be seen if AMD and other chip companies can encroach on Nvidia's market share over the coming years.

But which is the better buy now?

Choosing between these two investments depends on whether you believe Apple is more likely to rebound or if Nvidia will run out of steam. Looking at fundamentals, Nvidia has a clear advantage. I like using the PEG ratio to gauge how much I pay for a stock's earnings growth. In other words, how much bang for your buck are you getting?

Comparing the two stocks below reveals a clear winner:

Company Forward P/E Ratio Expected Long-Term Average Annual EPS Growth PEG Ratio
Apple 26.0 9.4% 2.7
Nvidia 35.6 34.8% 1.0

Data source: Ycharts. EPS = earnings per share.

Lower is better for the PEG ratio. I generally like buying stocks with a PEG ratio of 1.5 or less. As you can see above, Apple is far more expensive than Nvidia for the growth analysts expect over the long term.

Could Nvidia fall short of analyst estimates? Could Apple outperform its expectations? Of course!

But the gap is so vast today that it's hard to justify picking Apple over Nvidia, especially when the company puts up the financials to justify the hype the stock is getting. That makes Nvidia the better Magnificent Seven stock to buy until proven otherwise.