Microsoft (MSFT -0.93%) hit a new all-time high early on Wednesday -- making it the only company at the moment valued at a market cap over $3.5 trillion.
Investors wondering which "Magnificent Seven" stock could be next to have come to the right place. Here's the case for why Meta Platforms (META -1.70%) and Nvidia (NVDA -2.20%) could follow in Microsoft's footsteps and soon hit all-time highs, and why both stocks are worth buying now.

Image source: Getty Images.
Within striking distance
The simplest reason why Meta and Nvidia could quickly follow Microsoft and hit all-time highs is because both stocks are the next-closest Magnificent Seven members to their all-time highs.
Data by YCharts.
Meta and Nvidia may be close to making new highs, but it's a mistake to buy a stock just to make a quick profit. A better approach is to invest with a long-term mindset, and Microsoft, Meta, and Nvidia have the qualities necessary to be excellent investments for years to come.
Earnings evolution
Microsoft, Meta, and Nvidia may operate in different industries, but they have many similarities as businesses. All three companies have done a masterful job carving out high-margin operations in competitive, growing industries.
Microsoft has transformed its business from legacy software and hardware to the No. 2 cloud computing player behind Amazon Web Services (AWS). It has also leveraged artificial intelligence (AI) across its operations to boost efficiency and grow profit margins.
Instagram became such a prevalent social media app that Facebook changed its name to Meta Platforms to showcase the company's Family of Apps and virtual and augmented reality investments. Instagram has undergone a makeover from a stagnant, gallery-like interface centered around images to a dynamic platform with videos and an engaged community tailor-made for viral content. Instagram has helped Meta expand its revenue and margins and stay highly competitive with other short-form video options, like TikTok.
It wasn't long ago that Nvidia heavily depended on its graphics segment, which includes sales for gaming, PCs, visualization, and software for internet applications. But now, the company's compute and networking segment makes up the vast majority of operating income and is the company's main growth driver, as customers demand supercomputing platforms that can handle increasingly complex and large data sets and simulations.
In Nvidia's latest quarter, which was the three months ended April 27, compute and networking brought in $39.6 billion in revenue and $22.1 billion in operating income, compared to $4.5 billion in revenue for graphics and $1.6 billion in operating income. For context, Nvidia's compute and networking for the same quarter just one year ago was $22.7 billion and $17.1 billion in operating income -- illustrating the segment's breakneck growth rate.
In sum, Microsoft, Meta Platforms, and Nvidia have undergone considerable transformations in recent years. Newer business segments are arguably the most valuable part of each company -- cloud for Microsoft, Instagram for Meta, and sales for data centers for Nvidia.
Fair prices for exceptional businesses
When a company evolves, it can take the market time to properly value the new business. Microsoft, Meta, and Nvidia crushed the S&P 500 (^GSPC -1.13%) over the last five to 10 years, especially Meta and Nvidia. And yet, because all three companies are growing profits from their legacy business segments and new markets, their valuations are still reasonable.
Microsoft and Meta both have slightly higher price-to-earnings (P/E) ratios than their five-year median levels. Nvidia's P/E ratio is down considerably since the company wasn't as profitable a few years ago.
Data by YCharts.
As you can see in the chart above, expectations for Microsoft and Meta's forward earnings are fairly bleak, since their P/E ratios are just a little higher than their forward P/Es, suggesting low earnings growth. Meanwhile, Nvidia is still expected to grow quickly (but not as quickly as in the last few years), so its forward P/E is a lot less than its present P/E.
Still, all three stocks may look expensive at first glance compared to the S&P 500, which has a forward P/E of just 21.7. But given the industry-leading positions of all three companies in rapidly growing industries, their valuations are arguably justified, especially relative to other hot stocks.
Walmart (WMT -0.65%) and Costco Wholesale (COST -1.34%) -- the two most valuable companies in the consumer staples sector -- trade up 139% and 115%, respectively, over the last three years compared to a 46% gain in the S&P 500. But they haven't backed up those gains with considerable earnings growth -- leading to a valuation expansion for both stocks. Walmart has a sky-high P/E ratio of 41.6, and Costco is even more expensive, at 57 times earnings.
In an era when investors pay a premium price for high-quality companies across stock market sectors, Microsoft, Meta, and Nvidia aren't that expensive compared to many other names.
Financial stability
Another similarity between Microsoft, Meta, and Nvidia is that all three companies have impeccable balance sheets.
Microsoft finished its latest quarter with $79.6 billion in cash, cash equivalents, and short-term investments, compared to just $39.9 billion in long-term debt.
In its latest quarter, Meta reported $70.2 billion in cash, cash equivalents, and marketable securities, compared to just $28.8 billion in long-term debt.
Nvidia had $53.7 billion in cash, cash equivalents, and marketable securities, compared to just $8.5 billion in long-term debt on its balance sheet in its latest quarter.
Each company has at least twice as much cash, cash equivalents, and investments as long-term debt, providing an elite level of financial health. Having a strong balance sheet can come in clutch during an economic downturn, a slowdown in a key end market, or a compelling acquisition opportunity.
Cut from the same cloth
Microsoft, Meta, and Nvidia are ultra-elite Magnificent Seven companies due to their established and legacy business units, opportunities in newer industries, reasonable valuations, and balance sheet strengths. There are the kinds of businesses investors can be confident buying and holding over a period of at least three to five years.
It's never easy buying a stock near an all-time high. But if a company continues boosting its earnings year after year, it can grow into its valuation.
This concept is why it's better for long-term investors to focus on quality companies than trying to get a weak business for an inexpensive price. Or, as Warren Buffett famously said, "It's far better to buy a wonderful company at a fair price than a fair company at a wonderful price."
I'd say that Microsoft, Meta, and Nvidia are three wonderful companies at fair prices, making them great candidates for investors to load up on in June.