The artificial intelligence (AI) market hit a valuation of nearly $200 billion last year and has shown no signs of slowing. Data from Grand View Research shows the sector is projected to have a compound annual growth rate of 37% through 2030, which would see it reach nearly $2 trillion before the end of the decade.

As a result, dedicating a portion of your holdings to this high-growth market could be one of the best moves this year to potentially benefit from its long-term development.

Alphabet (GOOG 9.96%) (GOOGL 10.22%) and Amazon (AMZN 3.43%) are two attractive options because both operate leading cloud platforms. Cloud computing has become a crucial growth area for AI since these companies could leverage their massive data centers to steer the generative AI market in their favor.

So, let's examine these businesses more closely and determine whether Amazon or Alphabet is the better AI stock this month.

Alphabet

Shares in Alphabet are up 1% year to date, significantly lower than Amazon's 10% in the same period. The Google parent's stock took a dip after releasing its 2023 fourth-quarter earnings on Jan. 30.

A miss in its Google ad business, where revenue of $65 billion fell short of expectations by about $420 million, was a sore spot for stockholders. Then, reports that ChatGPT developer OpenAI could be preparing to launch its own web-search tool brought Alphabet's share price tumbling further in mid-February.

It hasn't been all bad news for Alphabet. The tech giant achieved $86 billion in total revenue in the fourth quarter, beating Wall Street estimates by more than $1 billion.

The company delivered stellar growth in its AI-focused Google Cloud segment, which saw revenue rise 26% year over year to $9 billion. Meanwhile, Google Cloud's operating income hit $864 million, improving on the $186 million in losses it reported in the year-ago period.

Alphabet isn't as far into its AI venture as some competitors. But with an over 80% market share in search engines, a quickly growing cloud business, and heavy investment in its AI tech, I wouldn't bet against the company over the long term.

Amazon

Wall Street has grown particularly bullish about Amazon over the last 12 months, with its shares up more than 70% since last February. The company has rallied investors with significant financial growth and exciting prospects in AI.

On Feb. 1, Amazon posted its fourth-quarter results, with revenue rising 14% year over year to $170 billion, beating analysts' estimates by nearly $4 billion. Meanwhile, its earnings per share hit $1, compared to the expected $0.80.

Over the last 12 months, impressive growth has sent Amazon's free cash flow soaring by 904% to $32 billion.

The tech company's e-commerce business has returned solidly to growth. But the best reason to invest in its stock is its highly profitable cloud platform, Amazon Web Services (AWS). As the world's leading cloud infrastructure provider, the tech giant has carved out a powerful role in AI.

Since the start of 2023, AWS has responded to the rising demand for AI services by expanding its offerings. For instance, in September, the company debuted Bedrock, a tool that offers a range of models that customers can use to build generative AI applications.

AWS also introduced CodeWhisperer, a platform that generates code for developers, and HealthScribe, a tool capable of transcribing patient-to-physician conversations.

In fiscal 2023, AWS accounted for 67% of Amazon's operating income despite delivering the lowest revenue of its three segments. As it continues to expand its AI services, Amazon could be in for consistent earnings boosts long into the future.

Is Alphabet or Amazon the better AI stock to invest in?

Alphabet and Amazon have promising outlooks in AI. Both companies have opportunities to boost multiple areas of their businesses with the technology. Alphabet can improve Google Search and offer clients more effective advertising. Meanwhile, Amazon has announced an AI assistant on its e-commerce site alongside new services on AWS.

However, estimates for earnings per share (EPS) suggest Amazon has more growth potential in the near term than Alphabet.

AMZN EPS Estimates for 2 Fiscal Years Ahead Chart

Data by YCharts.

This chart shows Alphabet's earnings could hit nearly $9 per share, while Amazon's may reach $7 per share by fiscal 2026. Multiplying these figures by the companies' forward price-to-earnings ratios (Alphabet's is 21 and Amazon's 40) yields a stock price of $189 for Alphabet and $280 for Amazon.

Considering their current positions, these projections would see Alphabet's stock rise 32% and Amazon's 65% within two years. While both companies' growth potential is impressive, Amazon could offer significantly higher returns. With a more dominant role in the cloud market, Amazon is the better stock to invest in the budding AI market.