The artificial intelligence (AI) industry exploded last year, with excitement over the technology unlikely to dissipate in 2024. According to Grand View Research, the AI market is projected to expand at a compound annual growth rate of 37% until at least the end of the decade, which would see it surpass a value of $1 trillion.

There's no better time to consider investing in the booming sector and potentially profiting from its long-term growth. Two of the most attractive options are Nvidia (NVDA 0.03%) and Alphabet (GOOG -3.33%) (GOOGL -3.37%). These companies are developing the hardware and software fueling the AI market's growth, and could deliver stellar gains over the next decade.

Let's take a closer look at these companies and determine whether Nvidia or Alphabet is currently the better AI stock.

Nvidia

Whether you've been following the boom in AI closely or have just glimpsed the occasional headline, chances are you know about Nvidia's meteoric rise over the last year. Since last January the company's shares soared 245% as its chips became the preferred hardware for AI developers worldwide.

Graphics processing units (GPUs) like Nvidia's are crucial to training and running AI models. As a result, demand for the chips skyrocketed in 2023 as countless companies pivoted their businesses to developing the segment. Nvidia's years of dominance in the GPU market allowed it to get a head start in AI, while rivals like Advanced Micro Devices and Intel have yet to catch up.

Alongside a rising stock price, Nvidia's success in AI has seen its earnings reach new heights. In the third quarter of 2024 (which ended October 2023), the tech giant's revenue increased by 206% year over year as operating income climbed 1,600%. The growth was mainly thanks to a 279% rise in data centers, which profited from a spike in AI GPU sales.

Nvidia will need to contend with increased chip competition in the coming months. However, the market's growth potential suggests there will be room for the company to retain its dominance and welcome newcomers, making this stock an attractive way to invest in AI.

Alphabet

While Nvidia is excelling in hardware, Alphabet has significant potential on the software side of AI. The company ramped up its expansion in the industry last year, launching its own version of OpenAI's ChatGPT in February called Bard, adding new AI tools on Google Cloud, and unveiling a highly anticipated AI model named Gemini in December.

Popular brands like Android, YouTube, and the many services under Google have seen Alphabet attract a massive user base. In fact, the company is home to at least nine products with more than 1 billion users. Alphabet has used the popularity of its services to build a lucrative digital advertising business, with the company responsible for about 25% of the $740 billion market.

However, the tech giant's substantial user base also strengthens its prospects in AI. An advanced AI model like Gemini could allow Alphabet to offer more efficient advertising, create a responsive search experience, and better analyze viewing trends on YouTube to improve video recommendations.

Alphabet hit nearly $77 billion in free cash flow last year, more than cloud competitors Microsoft or Amazon. As a result, the company has the financial resources to continue investing in AI and flourish over the long term.

Is Nvidia or Alphabet the better AI stock?

Nvidia and Alphabet will likely enjoy major gains from AI, with both looking like attractive stocks to hold for several years. However, EPS estimates suggest Nvidia might have more growth potential in the short term.

GOOGL EPS Estimates for 2 Fiscal Years Ahead Chart

Data by YCharts

These charts show how Alphabet's earnings could hit nearly $8 per share, while Nvidia's might achieve $24 per share over the next two fiscal years. Multiplying those figures by each company's forward price-to-earnings ratio (Alphabet's 21 and Nvidia's 40) yields a stock price of $168 for Alphabet and $960 for Nvidia.

Looking at their current positions, the projections would see Alphabet's stock rise about 24% and Nvidia's 96% in two years. As a result, despite its meteoric rise last year, Nvidia still has much to offer new investors, and is likely the better AI stock right now.