It hasn't been an easy year for equity markets. In times like these, though, it's important to remember that the buy-and-hold approach to stock investing remains one of the best and most accessible ways to grow wealth over time. So, rather than being rattled by current market volatility or economic uncertainty, it's more helpful to focus on finding companies that can perform well over the next few decades. While most corporations can't pull that off, here are two that have what it takes: Microsoft (NASDAQ: MSFT) and Shopify (NASDAQ: SHOP). These two companies have crushed the market this year, and there is plenty of upside left for patient investors.
Image source: Getty Images.
Where to invest $1,000 right now? Our analyst team just revealed what they believe are the 10 best stocks to buy right now. Continue »
1. Microsoft
Microsoft was among the 10 biggest stocks by market cap in 2005. It remains the only member of the top 10 ranking of 2005 to maintain a spot on the list 20 years later. That's a testament to Microsoft's longevity. Even though past successes don't guarantee future outcomes, the tech leader still possesses the qualities of a corporation capable of thriving for the next two decades. Microsoft remains by far the dominant force in the market for computer operating systems (OS). Its Microsoft 365 productivity tools are part of the day-to-day lives and operations of millions of individuals and businesses.
That's no longer Microsoft's main growth driver, but the company's deep, long-standing enterprise relationships are helping its all-important cloud computing business perform well. The company's Azure platform hosts Microsoft 365 services. For businesses that already use the latter, there are many advantages to also using the former as opposed to some other cloud service. That, combined with the tech giant's relationship with OpenAI -- perhaps the leader in AI -- is helping Microsoft gain market share against its longtime rival in the cloud, Amazon. The latter still has the edge, but Microsoft has been growing its sales faster.
The great news is that there is still plenty of room to grow, as we are still arguably in the early stages of both the cloud and AI revolutions. As Amazon CEO Andy Jassy said, some 85% of IT spending still happens on premises. Further, Microsoft benefits from a strong economic moat thanks to high switching costs and a strong brand name. So, Microsoft can ride this tailwind over the next 20 years and deliver excellent returns to its shareholders once again. The company has crushed the market this year, and there is plenty more where that came from.
2. Shopify
Shopify was founded in 2006, so it didn't exist 20 years ago. Since it came on the scene, though, it has catapulted itself as one of the leading e-commerce companies in the world. In the U.S., Shopify holds a more than 12% market share by gross merchandise volume. How did Shopify accomplish this feat? The company helped revolutionize the way merchants set up online storefronts. Shopify provides all the tools its clients need on its website. It is easy to set up and use; there is no need to be an expert in coding, and the platform is highly customizable -- all things that were lacking before Shopify came around.
Shopify also offers marketing tools, payment processing, and more. The company has evolved with the internet, enabling sales across social media channels. It recently announced a deal with OpenAI that will allow its merchants to sell products directly through ChatGPT.
Shopify has been rewarded for its efforts as the e-commerce space has grown significantly over the past 19 years. Yet, even this industry is still on a long-term growth path. While it's impossible to know what the size of the sector will be in 20 years, its penetration remains pretty low -- 16.3% as of the second quarter -- even in the U.S. Further, Shopify operates in over 175 countries, but still makes most of its money in the U.S.
International expansions should be another powerful tailwind for the e-commerce specialist. Over the next 20 years, Shopify could perform very well as it remains a leader in the field and continues to innovate. Investors should consider hopping along for the ride.
Should you invest $1,000 in Microsoft right now?
Before you buy stock in Microsoft, consider this:
The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Microsoft wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.
Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $657,979!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $1,122,746!*
Now, it’s worth noting Stock Advisor’s total average return is 1,060% — a market-crushing outperformance compared to 187% for the S&P 500. Don’t miss out on the latest top 10 list, available when you join Stock Advisor.
See the 10 stocks »
*Stock Advisor returns as of October 13, 2025
Prosper Junior Bakiny has positions in Amazon and Shopify. The Motley Fool has positions in and recommends Amazon, Microsoft, and Shopify. The Motley Fool recommends the following options: long January 2026 $395 calls on Microsoft and short January 2026 $405 calls on Microsoft. The Motley Fool has a disclosure policy.