Shares of Alphabet (GOOG 0.75%) (GOOGL 0.78%) soared to new highs following its first-quarter earnings report. This is a continuation of the momentum the stock has seen over the past year, with its shares up over 60% during that stretch.

Here's a look at why Alphabet shares were climbing following its Q1 earnings report and, more importantly, whether or not it's too late to buy the stock following its strong gains.

Alphabet as an AI company

On its earnings call, Alphabet management proudly said the company has been an artificial intelligence (AI)-first company since 2016. The one fear investors have had is that AI could become more of a detriment to Alphabet and its search dominance, so everything the company does to shift this sentiment and show that AI is helping drive growth is a big positive.

AI is powering results in the company's Google Cloud business, which saw Q1 revenue climb 28% to $9.6 billion. The cloud business is also beginning to show some solid operating leverage as it scales up, leading to the segment's operating income increasing by 3.7x to $900 million. This business has high fixed costs, so as it gets bigger and absorbs those fixed costs, profitability will go up much faster than revenue growth.

Alphabet credited its AI hypercomputer, which can train and serve models in efficient and cost-effective ways, as being a big differentiator. The company said 60% of funded gen AI start-ups and nearly 90% of gen AI unicorns use its Google Cloud services.

This isn't the only area where the company is benefiting from AI, however. Alphabet is using it across its ad ecosystem to help with everything from targeting, bidding, creative, and measurement. For example, it has developed a smart bidding tool that uses AI to predict future ad conversions.

It's also being used with search, where AI overviews are helping to improve the search experience while also prioritizing traffic to merchant websites. The company added that it's seeing increased search usage from people using this new feature.

The benefits of the AI advancements, along with a solid advertising backdrop, led to solid growth for both search and YouTube. Search revenue rose 14% to $46.2 billion in the quarter, while YouTube ads revenue jumped 21% to $8.1 billion.

These are impressive results and certainly help shift the AI narrative for Alphabet. The company has been investing in artificial intelligence for quite some time, and those investments are starting to pay off.

Picture of search bar

Image source: Getty Images.

A dividend and buybacks

In addition to the company's solid results, investors were also excited about Alphabet's new capital allocation plans. (Capital allocation is how companies direct their cash flow.)

Alphabet announced it will pay its first-ever dividend. The $0.20 per-share dividend will be paid out in June, and the company plans to pay a quarterly dividend going forward. While Alphabet isn't going to be mistaken for a high-yield stock, I expect the company to consistently grow its dividend in the coming years.

At the same time, Alphabet announced a $70 billion share repurchase program. It didn't give a time frame when it would buy back its shares, only saying it would be done in the company's and its shareholder's best interests.

Alphabet's No. 1 priority, however, remains to invest in its business. It continues to see huge opportunities ahead.

Is it too late to buy the stock?

Despite the stock's strong performance over the past year, Alphabet still trades at a very reasonable valuation at about 22.6x forward price-to-earnings (P/E) ratio and 6x revenue. That's a substantial discount to rival Microsoft, which is also benefiting from many of the same AI trends.

GOOGL PE Ratio (Forward) Chart

GOOGL PE Ratio (Forward) data by YCharts.

The company is clearly demonstrating that it's benefiting from AI, and the opportunity in front of it is huge. Given Alphabet's valuation and growth potential, it's not too late for investors to buy shares as there's plenty of upside potential for the stock over the long term.