Shares in Alphabet (GOOGL 10.22%) (GOOG 9.96%) are up 58% year over year, rallying Wall Street with an expansion in artificial intelligence (AI) and significant ad-revenue growth.

As the home of potent brands like Google, Android, Chrome, and YouTube, Alphabet has become a tech behemoth. Its various services attract billions of users, enabling the company to build a lucrative digital-advertising business. Meanwhile, its massive user base will likely prove a major asset in succeeding in AI.

The company is on a promising growth trajectory and has some exciting developments in the new year. So, here are three reasons to buy Alphabet stock in 2024.

1. Massive potential in artificial intelligence (AI)

Interest in AI has skyrocketed over the last year. The launch of OpenAI's ChatGPT stunned the tech world and motivated countless companies to pivot their businesses to developing the industry. While Alphabet is no stranger to AI, the company has similarly ramped up its expansion in AI since the start of 2023.

Last December, Alphabet unveiled Gemini, a highly anticipated AI model expected to be competitive with OpenAI's GPT-4. The new model could open the door to countless growth opportunities in AI for Alphabet and give it an edge against cloud rivals Microsoft and Amazon.

With Gemini, Alphabet could have the technology to create a search experience closer to ChatGPT, offer more effective advertising, introduce new AI tools on Google Cloud, and better track viewing trends on YouTube. Each of these has the potential to significantly boost earnings in the coming years.

Moreover, Alphabet hit over $77 billion in free cash flow last year, considerably more than Microsoft or Amazon. The company's considerable cash reserves strengthen Alphabet's outlook in AI, as it has the funds to invest heavily in its research and development and overcome potential hurdles.

2. Digital-ad spending is expected to spike in 2024

Alphabet's digital-ad business accounts for more than 80% of its revenue. The company has thrived in the $740 billion industry, responsible for about 26% of the market.

The Google company's success in the digital space is mainly owed to the immense popularity of its services. Alphabet has nine products with over 1 billion users, with the top performers being Google Search, Android, and Chrome. These platforms have made Alphabet a household name and offer the company almost endless advertising opportunities.

The digital-ad market encountered some obstacles in 2022, as spikes in inflation caused many businesses to cut costs. However, the industry appears to be recovering. According to Insider Intelligence, digital-ad spending is projected to rise 13% in 2024.

Meanwhile, Alphabet's recent quarterly reports reflect market improvements. In the third quarter of 2023, revenue rose 11% year over year, beating Wall Street estimates by nearly $1 billion. The growth was mainly thanks to an 11% rise in Google Search revenue and a 12% increase in YouTube ads.

Furthermore, AI is expected to increase profit margins in Alphabet's ad segments this year with the help of more generative features and automated ads.

3. Alphabet is the biggest bargain in the "Magnificent Seven"

Despite significant stock growth last year, Alphabet remains one of the cheapest options among the "Magnificent Seven" of tech. This phrase was coined by Bank of America analyst Michael Hartnett last year to describe the seven best-performing tech companies, which include Amazon, Nvidia, Tesla, Microsoft, Meta, Apple, and, of course, Alphabet.

These companies' stocks are known for delivering significant long-term stock growth. As a result, if they're trading at the right price, it's worth adding a few to your portfolio. And Alphabet is an attractive option in 2024.

AMZN PE Ratio Chart

Data by YCharts.

These charts compare the price-to-earnings ratios (P/E) and price-to-free cash flows of the "Magnificent Seven," with Alphabet's figures the lowest on both fronts. The Google company's lower-valuation metrics indicate its stock is the cheapest option of these companies.

P/E is calculated by dividing a company's stock price by its earnings per share. Meanwhile, price-to-free cash flow divides a company's market cap by its free cash flow. These metrics are helpful when determining a stock's value as they take into account a company's financial health.

As the cheapest option among some of the best-performing tech stocks, Alphabet is a screaming buy in 2024.