The recipe for retiring comfortably requires three key ingredients. First, you must have money to invest, of course. Second, you need assets that will grow your money. Third, you need time to allow your investments to grow.

The more money you have to invest, the less time you'll need to build a solid nest egg -- and vice versa. But the right assets can help tremendously. Want $1 million in retirement? Invest $300,000 in these three stocks and wait a decade.

1. Brookfield Renewable

By my calculations, it will take a compound annual growth rate (CAGR) of 12.8% to turn $300,000 into $1 million over the next 10 years. I think that investing one-third of that upfront amount in Brookfield Renewable (BEP 0.19%) (BEPC 0.09%) should get you a long way toward achieving that goal.

Brookfield Renewable's name hints at what the company does. It's a leading provider of renewable energy with hydroelectric, wind, solar, distributed generation, and storage facilities across the world.

The company is confident that it will be able to deliver total returns of between 12% and 15% per year over the long term. Brookfield Renewable doesn't even need to hit the midpoint of that range to meet our required CAGR. But can the company pull it off? I think so.

It's no secret that the demand for renewable energy is soaring. Countries and major corporations have set ambitious carbon reduction targets. More electricity will be needed with the rising adoption of electric vehicles. Brookfield Renewable is ready to help meet that demand with its large and growing development pipeline.

2. Microsoft

Microsoft (MSFT 1.82%) might seem to be an odd choice for our list. It's already the second-largest company in the world, with a market cap of nearly $2.8 trillion. If Microsoft grows by our 12.8% CAGR target over the next decade, it will be worth roughly $9.3 trillion.

I nonetheless think that investing $100,000 of the initial $300,000 in Microsoft and waiting 10 years could pay off handsomely. And I can sum up my rationale in two words: artificial intelligence (AI).

Arguably, no other company is in a better position to profit from the AI boom than Microsoft. The tech giant owns a large stake in ChatGPT developer OpenAI. Microsoft has integrated OpenAI's GPT-4 throughout its product lineup. As a major software developer, the company is also poised to benefit from productivity improvement by using AI.

Several AI leaders (including OpenAI CEO Sam Altman) predict that artificial general intelligence (AGI) could be developed within the next decade. If they're right, any company that is at the forefront of AGI should be wildly attractive to investors. I'd bet that Microsoft will be one of them.

3. Vertex Pharmaceuticals

Vertex Pharmaceuticals (VRTX -0.06%) commands a monopoly in treating the underlying cause of the rare genetic disease cystic fibrosis (CF). But CF isn't the main reason why investing the final one-third of an initial $300,000 and waiting 10 years can help you retire as a millionaire.

This big biotech is rapidly expanding beyond CF. Vertex has already won U.S. approval for Casgevy to treat (and effectively curing) sickle cell disease. It awaits a second approval decision for the gene-editing therapy in treating transfusion-dependent beta-thalassemia. The consensus projection for Casgevy's peak annual sales is around $2.2 billion, but some analysts think it could make a lot more than that.

Vertex has high hopes for its experimental non-opioid pain drug VX-548. The company plans to report results from three late-stage studies in early 2024. It's evaluating inaxaplin in a pivotal clinical study targeting APOL1-mediated kidney disease, which affects more patients than CF. Vertex's pipeline also features multiple programs in early-stage testing that hold the potential to cure type 1 diabetes.

CF will still be important to Vertex's fortunes, though. The biotech is set to soon announce results from late-stage studies of a new triple-drug combo that could be its most powerful and most profitable CF therapy yet.

There are always risks

I believe that investing $300,000 spread equally across Brookfield Renewable, Microsoft, and Vertex and waiting a decade truly can help you retire with $1 million. However, there are always risks with investing in stocks that can cause problems.

The growth in renewable energy could be slower than many predict and hobble Brookfield Renewable's prospects. AI breakthroughs could be fewer and farther between in the coming years, holding back Microsoft. Vertex could experience major pipeline setbacks.

Still, you can't expect to obtain significant returns without taking on some risk. I think that Brookfield Renewable, Microsoft, and Vertex offer attractive risk-reward profiles for aggressive investors.