As the artificial intelligence (AI) boom has progressed, many tech companies' valuations have skyrocketed. The stock market didn't get its first trillion-dollar company until August 2018, and now there are 14 companies worth at least $1 trillion (as of market close on May 29).
There are also four companies valued at more than $3 trillion: Nvidia ($5.11 trillion), Apple ($4.58 trillion), Alphabet (GOOG +0.44%)(GOOGL +0.53%) ($4.56 trillion), and Microsoft (MSFT +0.11%) ($3.34 trillion). There's a strong investment case for all four companies, but Alphabet and Microsoft stand out as no-brainer buys right now.
They've been on different trajectories so far this year -- Alphabet is up 19.3% and Microsoft is down 4.8% -- but the long-term appeal is strong for both.
Image source: The Motley Fool.
A monopoly with growing segments
Alphabet has been the best-performing "Magnificent Seven" stock since the start of 2025, doubling in that time. There's a lot to like about Alphabet's business, including its continued dominance in its core search and advertising businesses and its position in the AI race.
Any concerns about how generative AI tools would affect Alphabet's core advertising business have largely been put to rest. In the first quarter, its Google advertising segment grew revenue 15.5% year over year to $77.3 billion (70.3% of total revenue). Its "Google Search & other" segment grew revenue by 19.1%.
It has managed to balance the integration of AI features without cannibalizing itself. But that becomes much easier when you have 90% market share in search. That monopoly has continued to generate billions in steady cash flow.

NASDAQ: GOOGL
Key Data Points
In the AI race, Alphabet's main competitive advantage is its vertical integration. It makes its own advanced AI chips, (Tensor Processing Units, or TPUs), operates the world's third-largest cloud platform (Google Cloud), and has one of the more popular AI models (Gemini).
Having a full-stack AI operation allows Alphabet to be less reliant on other companies and keep its costs down. It still relies on companies like Taiwan Semiconductor Manufacturing to manufacture its chips and Nvidia for its GPUs, but Alphabet has much of its own infrastructure.
And although search and advertising will continue to keep the lights on for Alphabet, its cloud business is becoming the main segment driving growth. In Q1, it increased its revenue 63% year over year, leading all segments. Add in its $462 billion backlog, and that's a business that will fuel a lot of Alphabet's growth in the coming years.
Millions of businesses run on Microsoft
Microsoft (MSFT +0.11%) has had a rough start to the year, but that presents more of an opportunity than a reason to ring the alarm. At the time of this writing, Microsoft is trading at 26.8 times its earnings, which is well below its average for the past five years.
MSFT PE Ratio data by YCharts
With Microsoft, you're getting as diversified a tech company as there is. It has its hands in tons of industries, but its competitive advantage is its enterprise software business. Between Microsoft 365 tools (Excel, Teams, Outlook, etc.), Windows, and its cloud platform (Azure), Microsoft is the king of the enterprise software world. It's part of the daily operations of tens of millions of businesses.

NASDAQ: MSFT
Key Data Points
Even at its size, Microsoft continues to deliver impressive financial results. In its most recent quarter (ended March 31), it increased revenue by 18% year over year to $82.9 billion, net income by 23% to $31.8 billion, and operating cash by 26% to $46.7 billion.
Wall Street hasn't been thrilled with Microsoft's capital expenditure projections ($190 billion this year), but when it's bringing in that much cash and has a strong balance sheet, I'd rather the company overspend to ensure it's keeping up in the AI race than underspend and risk falling behind.
Like Alphabet, Microsoft's growth will depend heavily on its cloud business. In the most recent quarter, Azure and other cloud services revenue increased 40%, and Microsoft's backlog almost doubled to $627 billion. Azure won't catch up to Amazon Web Services' (AWS) size any time soon, but there's still a lot of money to be made, not to mention growth potential.
Microsoft's current valuation is too good to ignore for long-term investors.






