Buying high-quality companies and holding them for a long time could work wonders for an investor's portfolio since this strategy benefits from the power of compounding, and takes advantage of the secular growth in the markets those companies operate in.

Let's say your retirement is a decade away and you have $200,000 in investible cash right now: Which are two stocks you should be buying -- either individually or combined -- so that you can retire as a millionaire? Here are two names to consider.

1. Nvidia

A $200,000 investment in Nvidia (NVDA 6.18%) a decade ago is now worth almost $25 million.

NVDA Chart

NVDA data by YCharts.

As the chart above shows, shares of Nvidia started taking off in 2020 with booming demand for its graphics cards. The year 2022 was bad for its investors as weak demand for personal computers (PCs) led to a sharp decline in sales of the company's gaming graphics cards. But it didn't take long for Nvidia to regain its mojo.

The stock has shot up remarkably in the past year and nearly tripled. This sharp increase in share price is justified by the tremendous growth the company has been delivering in recent quarters thanks to the massive demand for its artificial intelligence (AI) chips.

Nvidia's revenue in the third quarter of fiscal 2024 (ended Oct. 29) increased 206% year over year to $18.1 billion. Earnings grew almost sevenfold year over year to $4.02 per share.

And the company's fiscal fourth-quarter outlook calls for $20 billion in revenue and an adjusted gross margin of 75.5%. In the year-ago quarter, revenue was $6 billion, and its adjusted gross margin was 66%.

So, Nvidia's revenue is set to grow even faster in the current quarter, while fatter margins should lead to robust earnings growth once again. Analysts have raised their revenue forecasts following the company's latest results.

NVDA Revenue Estimates for Current Fiscal Year Chart

NVDA revenue estimates for current fiscal year; data by YCharts.

Nvidia finished fiscal 2023 with $27 billion in revenue, which means that its sales could more than double this year. By fiscal 2026, the company is set to exceed $106 billion in revenue.

And Wall Street analysts are even more bullish about the company's prospects. Mizuho's Vijay Rakesh expects the top line to hit $300 billion in 2027, driven by the company's 75% share of the AI chip market at that time.

As such, Wall Street expects earnings could increase at an annual pace of 72% over the next five years. If that's the case, its bottom line could jump to almost $150 a share after five years, based on the current fiscal year's earnings estimate of $9.95 per share. Using Nvidia's five-year average forward earnings multiple of 41 indicates the stock's price could be $6,150 at the end of that time span.

That would be over 12 times the current price, indicating that investors with $200,000 of investible money do have a chance to retire as millionaires if they consider putting it into this hot AI stock right now.

2. Dutch Bros

Dutch Bros (BROS -1.04%) is a drive-thru coffee chain that went public in September 2021. The stock has lost 20% of its value since then, but this is an opportunity for investors to buy a fast-growing company on the cheap.

Dutch Bros is now trading at just 1.8 times sales, and its financial performance suggests that the company is built for long-term growth.

On Nov. 7, the company reported third-quarter results showing record revenue of $265 million, an increase of 33% over the prior-year period. Adjusted earnings per share (EPS) increased to $0.14 from $0.09 in the year-ago quarter. Dutch Bros' robust growth was driven by a combination of new store openings, as well as an increase in same-store sales.

The chain opened 39 new stores last quarter, bringing its total store count to 794. Sales from stores that were open in the year-ago quarter (comps) increased by 4%. Management expects to finish 2023 with revenue in the range of $950 million to $1 billion, which would be a 28% jump over 2022 at the lower end.

More importantly, analysts are anticipating Dutch Bros to maintain 20%-plus revenue growth over the next couple of years as well.

BROS Revenue Estimates for Current Fiscal Year Chart

BROS revenue estimates for current fiscal year; data by YCharts.

One reason it could deliver such robust growth is because it plans to take its total store count to 4,000 over the next 10 to 15 years. The company's current store count suggests that it has reached just 20% of its goal. What's more, analysts are anticipating Dutch Bros' bottom line to increase at an annual rate of 47.5% over the next five years, something that the company could deliver based on its improving margin profile as well as the healthy revenue growth.

BROS Operating Margin (TTM) Chart

BROS operating margin (TTM) data by YCharts; TTM = trailing 12 months.

Assuming that Dutch Bros can maintain even 40% annual earnings growth over the next decade, its bottom line could jump to $8.40 per share in 2033 from this year's estimated earnings of $0.29. Multiplying that with the S&P 500's average forward earnings multiple of 20 indicates that the stock could be trading at $167 after a decade, which would be a jump of 5.7 times over current levels.

In other words, Dutch Bros' healthy top- and bottom-line growth can turn a $200,000 investment into more than $1 million in a decade, using fairly conservative growth estimates. That's a nice boost for your retirement portfolio.