The "Magnificent Seven" is a collection of the world's largest technology stocks. They earned the name last year when they delivered an average gain of 112%, which crushed the 24% return of the S&P 500 index. The seven stocks include:

  1. Microsoft (MSFT -1.06%)
  2. Amazon (AMZN 0.91%)
  3. Nvidia
  4. Meta Platforms
  5. Apple
  6. Alphabet
  7. Tesla

Some members of the group are faltering in 2024, with Tesla stock sinking 33% and Apple down by 12%. By comparison, the S&P 500 is up 9% this year and is trading near an all-time high.

But even though some of the Magnificent Seven stocks are trailing the market right now, others like Microsoft and Amazon continue to outperform. Here's why those two businesses are a buy this month, even though they are trading near their best-ever levels.

A person's hands typing on a keyboard, with a digital rendering of a computer screen popping up.

Image source: Getty Images.

1. Microsoft: A potential long-term leader in consumer-facing artificial intelligence

Microsoft rocked the technology sector when it announced plans to invest $10 billion in ChatGPT creator OpenAI last year. It might be the most important deal in Microsoft's history, and the company has wasted no time integrating OpenAI's latest AI models into its entire product portfolio. In fact, it's a key reason Microsoft surpassed Apple to become the world's biggest company.

Microsoft Azure is the world's second-largest provider of cloud services, and more than 53,000 business customers are paying to use large language models (LLMs) -- including OpenAI's GPT-4 -- to build their own AI applications on that platform. But Microsoft's consumer-facing products might be an even more lucrative opportunity over the long term.

The company developed a virtual assistant called Copilot, which is similar to ChatGPT except it runs on a blend of OpenAI's GPT-4 and Microsoft's own in-house models. It has embedded Copilot into the Windows operating system, 365 document suite, Bing search engine, and Edge internet browser.

Around 1.4 billion active devices worldwide are using Windows 10 and 11 alone (that includes commercial users). Even if only a fraction of them regularly engage with Copilot, it would be one of the most widely adopted AI assistants in the world. Considering it can answer complex questions and even generate images, Copilot has the potential to pull traffic away from traditional search engines like Google, creating an enormous financial opportunity for Microsoft through advertising.

Over 1 billion people also use Microsoft 365 applications like Word, Excel, and PowerPoint (including 400 million corporate seats), and Microsoft now offers a Copilot add-on for $30 per user monthly. AI is the ultimate productivity tool, and it's the perfect companion for applications like Word because it can quickly draft content to save the user significant amounts of time.

If just 100 million 365 users adopt Copilot, it could add $3 billion to Microsoft's revenue every single month. That would translate into a 17% increase on the company's $211 billion in fiscal 2023 revenue. The potential of Microsoft's large installed base of software products that could be used as vessels to monetize AI, whether via advertising or paid subscriptions, is a key reason Microsoft is now the world's biggest company, with a $3.1 trillion valuation.

Microsoft stock continues to march higher, gaining 12.7% in 2024 already. With a price-to-earnings (P/E) ratio of 38, it's more expensive than the Nasdaq-100 index, which trades at a P/E of 31. It implies investors are willing to pay a premium for Microsoft's future potential relative to its peers in the tech sector.

As long as investors can hold on for at least the next few years, there is no time like the present to buy Microsoft stock.

2. Amazon: Dominating the three core layers of enterprise artificial intelligence

Amazon is the world's largest e-commerce company, and it still generates more revenue from online sales than any of its other business segments, despite expanding into cloud computing, digital advertising, streaming, and more.

Amazon Web Services (AWS) is the largest cloud platform in the world by revenue, and it offers hundreds of digital solutions to help its business customers store data, operate their online sales channels, and develop software. But AWS is also home to many of Amazon's AI initiatives, and it wants to dominate three of the technology's core layers: hardware, LLMs, and applications.

On the hardware side, Amazon fills its data centers with Nvidia's leading GPU chips like most other cloud providers. However, the company also designs its own chips. Its latest Trainium2 data center product allows developers to train their LLMs up to 4 times faster than the previous version, and some estimates place it on par with Nvidia's latest H200 GPU in terms of performance. Nvidia consistently struggles to keep up with demand, which creates an opportunity for Amazon to funnel users into its own hardware.

Amazon also develops LLMs under its Titan program. Developers can access them on AWS and use them as the foundation for their AI applications. It saves a substantial amount of resources, because building an LLM requires mountains of data, time, and money. Beyond Titan, AWS also offers large language models from leading AI start-ups like Anthropic, in which Amazon recently invested $4 billion.

The final layer is the finished application. AWS offers products like CodeWhisperer, which helps developers accelerate their software programming. AWS also launched a virtual assistant called Q recently, which is perfect for businesses looking for a ready-made chatbot as opposed to building their own. Q can be tailored to meet specific needs and trained on the data of any organization to be as helpful as possible.

Amazon generated $574 billion in total revenue last year, which is more than any of the other Magnificent Seven companies. However, despite its stock rising 20% in 2024 already and trading near an all-time high, it's still the cheapest of the Magnificent Seven as measured by the price-to-sales ratio. That spells opportunity for investors.