Buying and holding great companies for the long run is a tried and tested way of increasing one's wealth. Such a strategy allows investors to take advantage of secular growth trends along with the power of compounding. That's something that the likes of Microsoft (MSFT 0.45%) and The Trade Desk (TTD -0.47%) have helped investors achieve over the past seven years.

A $3,000 investment in these companies in 2016 has increased substantially by now. It won't be surprising for them to replicate their terrific returns through 2030 as well, thanks to big opportunities for them ahead. Let's look at the reasons why Microsoft and The Trade Desk could double investors' money once again by the end of the decade.

1. Microsoft

A $3,000 investment in Microsoft stock in January 2016 is now worth over $15,000, despite the turmoil that the company has witnessed in the past year, assuming the dividends were reinvested. The technology giant can deliver such solid returns through 2030 as well, thanks to opportunities in cloud computing, video gaming, and workplace collaboration tools.

Of course, Microsoft is not in the best shape right now, thanks to the slowdown in personal computer (PC) sales -- as reflected in results for its fiscal 2022's second quarter (ended Dec. 31, 2022). The company's total revenue increased just 2% year over year to $52.7 billion. Though the cloud and productivity business performed well last quarter, revenue from the personal computing business dropped 19% year over year to $14.2 billion.

That's not surprising, considering the sharp decline in PC sales over the past year. But investors should focus on the bigger picture as the PC market is expected to regain its mojo starting in 2024. According to estimates compiled by Statista, the global PC market is expected to generate $219 billion in annual revenue by 2026, compared to $207 billion in 2023. At the same time, the growth in demand for gaming consoles should also be a tailwind for Microsoft's personal computing segment.

Mordor Intelligence is forecasting a 15% annual increase in sales of gaming consoles through 2028. This should boost Microsoft's addressable market and help it move more of its Xbox gaming consoles and its gaming titles in the long run, thereby boosting the prospects of the personal computing segment.

Meanwhile, Microsoft is recording impressive growth in the cloud and productivity businesses. Revenue from its Intelligent Cloud business segment was up 18% year over year to $21.5 billion. This business should be able to sustain healthy growth for a while as Microsoft's Azure controls a solid 21% of the cloud infrastructure service market. It is also worth noting that the global cloud computing market could generate $1.55 trillion in revenue by 2030, registering an annual growth of nearly 16% through the end of the decade.

These catalysts should help drive the company's earnings growth in the long run. Analysts are expecting Microsoft to clock 12.5% annual earnings growth for the next five years. Assuming the company manages to sustain this growth through 2030, its earnings could jump to $21.60 per share by the end of the decade.

Multiplying the projected earnings by Microsoft's five-year average forward earnings multiple of 28 would translate into a stock price of nearly $605 in 2030. That's well above the company's current stock price of around $240. So, Microsoft could substantially multiply a $3,000 investment by 2030, especially considering that it sports a dividend yield of 1.13%.

2. The Trade Desk

A $3,000 investment in The Trade Desk when the company made its stock market debut in September 2016 is now worth a whopping $49,000. More importantly, the space in which the company operates means that it could deliver such a terrific performance once again over the next seven years.

The Trade Desk is an advertising platform provider offering a cloud-based service to customers and marketers through which they can plan, buy, manage, and optimize advertisements. The ads can be displayed across different platforms such as connected television (TV), audio, video, display, and digital outdoor advertising. The Trade Desk's wide network of 150 partners gives its customers the ability to target their audience more efficiently, thereby generating stronger returns on their ad spending.

These advantages explain why the company's platform is witnessing healthy demand. The Trade Desk is expected to report 32% revenue growth for 2022 to $1.58 billion, and analysts expect it to sustain its healthy growth over the next couple of years as well.

Chart showing The Trade Desk's estimated revenue for the next two years rising and then plateauing.

TTD Revenue Estimates for Current Fiscal Year data by YCharts

But it won't be surprising to see The Trade Desk maintain its healthy growth for a longer period, thanks to a massive addressable market opportunity in the digital ad market. Global digital ad spending is expected to hit nearly $1.45 trillion by 2030, a big increase from $374 billion in 2020. So, The Trade Desk could attract more users to its platform thanks to the secular growth in digital ad spending, which is why it won't be surprising to see the company maintain healthy top- and bottom-line growth through 2030.

Analysts are anticipating 24% annual earnings growth from the company for the next five years. But even if it manages to clock a 20% growth rate through 2030, its earnings could jump to $3.70 per share by the end of the decade from this year's estimate of $1.03 per share.

The Trade Desk is currently trading at 38 times forward earnings. Assuming the company's forward price-to-earnings ratio drops to 30 after seven years as its growth matures, it could still be trading at $111 per share by 2030. That would be more than double its current stock price of around $50.

So The Trade Desk is another tech stock in which investors can consider putting $3,000 and potentially see their investment grow impressively in the future.