Warren Buffett once said that "our favorite holding period is forever," when discussing his approach to stocks. Why is that? Well, if a company can compound capital at high rates for long periods, a stock can appreciate 10, 25, or even 100 times your initial investment... given enough time.

Heading into the end of 2021, the following three tech stocks look like prime candidates for your "forever" portfolio.

A woman hops from cloud to cloud in the sky.

Image source: Getty Images.

Microsoft

Though cloud giant Microsoft (MSFT 1.65%) was founded at the dawn of the personal-computing era, it has shown an incredible ability to adapt to new technology trends. Microsoft rose to prominence in the 1980s thanks to its near-monopoly of PC Windows operating systems, as well as the standard Microsoft Office enterprise software suite.

In the modern era, Microsoft has been able to leverage its deep ties with global enterprises to become a formidable player in cloud computing with its Azure platform, enterprise resource planning with its Dynamics 365 suite, and enterprise social networking with LinkedIn, which it acquired in 2016.

The combination of organic investments and acquisitions has enabled Microsoft to continue growing at very high rates, impressive for a company that is now 46 years old. Last quarter, Microsoft grew revenue at 19%, which is incredible considering that's on a $165 billion revenue run rate. Even more impressive? That's high-profit growth, as the company continues to expand its margins with operating income up an even greater 31%.

Microsoft should continue to put up similar growth numbers in the future, as a number of its highest-growth segments make up a greater and greater part of its revenue base. Look out for rising stars Azure (up 50% last quarter), Dynamics (up 26%), Xbox (up 34%), and LinkedIn (up 25%).

Finally, Microsoft seems to have another advantage over its FAANG cohorts, in that it's not under the hot spotlight of anti-monopoly lawsuits. In fact, Microsoft is in the process of acquiring Nuance Communications for $19.7 billion, a leader in healthcare and enterprise artificial intelligence applications. Should the deal go through, it will add yet another powerful tool in Microsoft's cutting-edge portfolio.

With proven adaptability, a long growth runway, and the ability to make acquisitions, Microsoft still looks like a great core tech holding for the long-term.

A map of Indonesia.

Image source: Getty Images.

Sea Limited

Sea Limited (SE 4.34%) is a growing force in e-commerce, mobile video games, and digital payments in Southeast Asia. Having already launched the blockbuster mobile game Free Fire in 2017 -- the distributor's first attempt at in-house game development -- Sea's Shopee e-commerce platform has already vaulted ahead of competitors to become the leading e-commerce player in Southeast Asia in just six years of existence.

Sea Limited's stock has rocketed a stunning 2,110% over the past three years as a result, but it still looks to be a stock to hold for the long term. Obviously, the company's management has lots of business acumen across both video games and as e-commerce, two fairly different businesses, which is impressive. And the company's SeaMoney fintech platform is in its very early stages.

Meanwhile, Sea Limited has made an aggressive move into Latin America this year. After dipping its toe into Brazil in 2019, Sea became the most-downloaded shopping app in the country in 2021, and with the second highest number of monthly active users. Leapfrogging on that success, Sea's Shopee recently entered Mexico, Chile, Colombia, and Argentina this year, in a full-court press against incumbent leader MercadoLibre. To top things off, Shopee has also reportedly begun recruiting sellers in India, an enormous future market, as well as Poland, its first European geography to date.

While Sea's stock is no doubt expensive, its proven ability to beat established competitors and its aggressive pace of expansion means it's another stock investors can buy and hold for decades.

Three cloud icons with the words private hybrid and public with arrows.

Image source: Getty Images.

Nutanix

While software-as-a-service stocks are not really known for their cheapness, Nutanix (NTNX 2.02%) looks like one of the biggest bargains in the space. Though still making losses and burning cash, Nutanix trades at only around 5.4 times its current annual contract value (ACV), which is a good proxy for its annual run-rate revenue.

That's far too cheap for a company that grew that ACV by 26% last quarter and has a highly relevant product set for the cloud computing era. Nutanix is a leader in hyperconverged infrastructure, which allows enterprises to seamlessly manage their IT workloads across multiple public and private clouds from a single plane of glass. The HCI market is projected to grow at a 28.1% annual rate between 2020 and 2025 to reach $27 billion by 2025, according to Markets and Markets.

However, Nutanix believes its newer products in adjacent markets, such as disaster recovery-as-a-service and database-as-a-service, could bring its market opportunity to $60 billion-plus. Nutanix's product also appears to favored by workers who actually use its product, with a best-in-class NPS score of 90.

Nutanix has had a bit of a rocky few years as it transitioned from selling life-of-device hardware to selling software in 2018, then transitioning from perpetual licenses to annual subscriptions just since the second quarter of 2019. That caused a lot of lumpiness in headline revenue and potential confusion from investors over the past two years, which is why the stock is so cheap.

However, as of last quarter, 90% of Nutanix's billings were on the newer subscription model, so it's almost through its transition. That means top-line revenue should move closer to ACV growth, which also means investors may begin to see Nutanix as more of a growth stock again.

Given the huge and ongoing shift to hybrid cloud computing, Nutanix has a great product-market fit for the 2020s. The stock has outperformed recently, but is still well below all-time highs set back in 2018, pre-transition. That means it could still be a good time to buy shares of this hybrid cloud leader, with the goal of holding at least through the 2020s.