Shares of Nvidia (NVDA -1.99%) and Apple (AAPL 0.02%) have been crushing the broader stock market this year, though there is a vast difference in the gains that these two tech giants have delivered so far in 2023.

Apple stock has jumped 42% year to date, easily outpacing the 15% gains delivered by the S&P 500, and it now boasts a market cap of $2.9 trillion, which makes it the largest company in the world by that metric. Nvidia stock, on the other hand, has nearly tripled in 2023, and the company recently joined the $1 trillion club.

But can Nvidia continue to outperform Apple on the stock market and eclipse the latter's market cap by 2025? Let's find out.

How big could Nvidia get by the end of 2025?

The rapid adoption of artificial intelligence (AI) applications, especially generative AI, has created a massive tailwind for Nvidia. The chipmaker's graphics cards have witnessed a big jump in demand thanks to AI as they are capable of computing huge amounts of data simultaneously, which allows data centers and servers to train complex AI models quickly.

This explains why Nvidia has reportedly placed more orders for semiconductor wafers from its foundry partner Taiwan Semiconductor Manufacturing, popularly known as TSMC. The Taiwan-based foundry giant reportedly provides 8,000 to 9,000 chip-on-wafer-on-substrate (CoWoS) packages to Nvidia monthly, which the company uses to manufacture its compute GPUs (graphics processing units) and deployed for AI applications.

But a report from Taiwan-based daily newspaper DigiTimes suggests that Nvidia is looking to procure an additional 1,000 to 2,000 wafers each month from TSMC for the rest of the year. That's not surprising, as Nvidia has reportedly got more orders than it can fulfill and its backlog for AI chips reportedly stretches until December of this year.

Given that the price of these chips starts at $10,000 and could go beyond  $40,000, the company is set to enjoy robust revenue and earnings growth in the ongoing fiscal 2024 (which will end in January 2024). More specifically, Nvidia's revenue is expected to increase to $43 billion in fiscal 2024, compared to $27 billion in fiscal 2023. Even better, its top line is expected to jump at least another 50% over the next couple of fiscal years.

NVDA Revenue Estimates for Current Fiscal Year Chart

NVDA Revenue Estimates for Current Fiscal Year data by YCharts

According to the chart above, Nvidia could hit $65 billion in revenue in fiscal 2026 (which will end in January 2026). The semiconductor giant is currently trading at 41 times sales. While that's quite expensive, Nvidia's terrific share of more than 95% of the fast-growing market for AI chips means that it could continue to command such a premium in the future. Assuming Nvidia keeps trading at a similar multiple at the end of fiscal 2026, which coincides with calendar 2025 to a large extent, its market cap could touch $2.7 trillion if it hits $65 billion in sales.

However, that would be lower than Apple's current market cap of $2.9 trillion. Given that Apple is likely to deliver healthy growth over the next couple of years thanks to a big iPhone upgrade cycle, the tech behemoth's market cap could rise further. So even though Nvidia could get close to Apple's market cap by 2025, it may not be able to eclipse the world's largest company despite trading at a rich sales multiple.

Why Apple could eventually be overtaken

While Nvidia may not become bigger than Apple by 2025, it wouldn't be surprising to see the former achieve that milestone over a longer period. Analysts are forecasting Nvidia's earnings to increase at an annual rate of nearly 20% over the next five years, though it could do better given its terrific pricing power in the rapidly growing AI chip market.

Apple's earnings are expected to grow at a slower pace of 8% a year for the next five years. As Apple gets the majority of its revenue from the smartphone market, which is expected to see annual revenue growth of just 2.5% over the next five years, it is not surprising to see that analysts are expecting the company to clock single-digit earnings growth. Meanwhile, the market for AI chips could post 30% annual growth over the next decade, and Nvidia's dominant position there means that it could easily sustain a higher level of earnings growth.

More importantly, Nvidia could keep growing at a faster pace than Apple even beyond the next five years given that it is sitting on lucrative and nascent opportunities. At the same time, Nvidia could continue to command a richer valuation compared to Apple.

All this indicates that Nvidia may become more valuable than Apple in the long run after getting close to the latter by 2025, the year when the semiconductor stock could hit a potential market cap of $3 trillion and deliver a handsome upside from current levels.