Analysts at Jefferies recently ranked the so-called "Magnificent Seven" stocks based on which ones they thought would outperform in 2025. The name refers to a group of leading mega-cap tech stocks that have been helping lead the market higher the past couple of years.

Its top picks among the group were Nvidia (NVDA -3.12%) and Alphabet (GOOGL 1.13%) (GOOG 1.16%). The group also includes, by order of Jefferies' rankings, Meta Platforms, Apple, Amazon, Tesla, and Microsoft.

The firm's rankings were based on several quantitative measures, including growth, valuation, yield, earnings revisions, sell-side analyst sentiment, return on invested capital (ROIC), stock price momentum, and research and development (R&D) versus capex (capital expenditures) spending.

Nvidia grabbed the top spot largely due to its strong growth, upward guidance revisions, attractive valuation, and strong analyst sentiment.

Let's look at why I think both Nvidia and Alphabet stocks are attractive buys.

1. Nvidia

Nvidia remains a great combination of incredibly strong growth at an attractive valuation. The company is on pace to report its second consecutive year of triple-digit revenue increases, which given its size is quite remarkable.

Meanwhile, analysts are projecting more than 50% sales growth in 2025. And it is attractively valued with a forward price-to-earnings ratio (P/E) below 33 times and a price/earnings-to-growth ratio (PEG) of 1. PEGs below 1 are generally considered undervalued, although growth stocks will often have PEGs well above 1.

Nvidia's growth comes from a combination of the frantic buildout of artificial intelligence (AI) infrastructure and the wide moat the company has created through its CUDA software platform. Its graphics processing units (GPUs), which were originally created to speed up graphics rendering in video games, have become the backbone of AI infrastructure given their superior processing speeds.

As large tech companies and AI start-ups rush to improve their AI models, they need more and more computing power to train them, which is largely coming from GPUs. Through Nvidia's CUDA X collection of libraries, tools, and microservices, its semiconductors are easily programmable for various AI tasks, which has allowed it to take a nearly 90% market share in the GPU space.

Elon Musk's xAI is a great example of the growing use of GPUs in AI model training. The company used 20,000 GPUs to train its Grok 2 model, while it originally was using 100,000 GPUs to train its Grok 3 model, but then increased it to 200,000 for phase two of its training. Meanwhile, Musk has talked about xAI's data center hosting a 1 million GPU cluster in the future.

Meanwhile, Nvidia's largest customer, Microsoft, announced it will spend $80 billion on AI data centers this year. Not to be outdone, a consortium consisting of Oracle, SoftBank Group, and OpenAI has discussed spending up to $500 billion on AI infrastructure in Texas as part of the recently announced Project Stargate.

A lot of this spending will undoubtedly go toward GPUs. These projects demonstrate the type of growth still ahead for Nvidia.

Artist rendering of AI chip.

Image source: Getty Images.

2. Alphabet

While no mega-cap company can come close to matching Nvidia's recent growth, Alphabet is a strong growing company that has the cheapest valuation among the Magnificent Seven with a forward P/E of only 19.4.

Last quarter, Alphabet grew its revenue a solid 15%, while its profits soared 34% and its earnings per share climbed 37%. The growth was led by its cloud computing division, Google Cloud, which grew its revenue by 35%.

Cloud computing is a business with very high fixed costs that has a lot of operating leverage once the business reaches scale. That was seen in its last quarter, when the segment saw a profitability inflection point, with segment operating income surging from $266 million a year ago to $1.95 billion.

With organizations scampering to build out their own AI models and applications, expect this business to continue to grow strongly as Alphabet adds more data center capacity. Meanwhile, the company could see even more operating leverage as it has developed its own custom AI chips with the help of Broadcom, which it has said in combination with GPUs is helping reduce AI inference processing times and lowering costs.

As it continues to scale up as the smallest of the big-three cloud computing companies and with its custom chip advantage, Google Cloud's margins should continue to improve, leading to strong earnings growth.

At the same time, Alphabet owns the world's dominant search engine in Google and YouTube, the most viewed streaming platform globally. These businesses continue to grow revenue by double digits, with sales for its overall Google Services segment climbing 13% last quarter. Segment operating income soared 29% to $30.9 billion.

The company is looking to incorporate its new Gemini AI model throughout its businesses this year to help drive growth, while also looking to promote its Gemini app, which is its answer to ChatGPT.

Management also has other emerging businesses that it is investing in, including quantum computing, where it recently announced a big technological breakthrough. It also owns Waymo, which is currently the only company offering paid robotaxi rides in the U.S. These are presently money-losing business, but they have big potential.

Overall, Alphabet is a nice combination of growth and value with some solid longer-term optionality with its investments in robotaxis and quantum computing.