Investing for retirement can be viewed in different ways. Some might want to stay conservative and just let time and compounding build up a nest egg. Others may want to take on a large amount of risk knowing there are still years of work-related income ahead to make up for any losses.

The truth is, both are right. Even if someone has decades of working years before needing retirement income, it probably isn't smart to be overly aggressive trying to hit a multibagger for a windfall. Even some relatively conservative investments can turn into huge wins over time, and a combination of those two approaches likely makes the most sense.

Here are two stocks to include in a portfolio that would make good sense for a long investment time horizon.

Be open to some risk

Tesla (TSLA 0.79%) has become a very profitable and successful company that should still have years and decades of growth ahead. But it clearly isn't a cheap stock by traditional standards. That's because investors see a huge runway ahead for the electric vehicle (EV) sector as well as Tesla's energy business. Its stock recently traded at a price-to-earnings (P/E) ratio of about 52 based on 2022 earnings.

While analyst estimates vary widely, there is a real chance that Tesla's 2023 earnings might not increase significantly. The company has dropped vehicle pricing as competition has dramatically increased the options for consumers looking at EVs. But it still can make a great investment for those who can look beyond a potential lack of short-term returns. 

Tesla is still in the early stages of ramping up its two most recently opened vehicle factories in Texas and Germany. It has already announced its fifth plant, which will be built in Mexico.

It is also expanding its gigafactory in Nevada that serves its battery and energy-storage businesses, and it plans a new battery-storage factory adjacent to its vehicle plant in Shanghai.

All these investments are being funded by cash from its existing operations as it also continues to generate free cash flow. 

When Tesla reports first-quarter 2023 earnings on April 19, there will be a focus on several things. All eyes will be on how its profit margin has been affected by the company's pricing moves.

But alert investors will also look to see the growth rates in its businesses other than EVs. Those energy and charging segments led growth in the fourth quarter, and are now contributing meaningful amounts to Tesla's revenue, as can be seen in the chart below. 

Chart showing Tesla's revenue streams in the 2022 fourth quarter.

Energy and Supercharger revenue are fast growers for Tesla.

While there are risks associated with its current valuation as well as from growing competition, Tesla has plenty of potential. Investors looking years out toward retirement might find it is a good fit for ther portfolio.

Turn a little income into a lot

It is often said that past performance is not an indication of future results. But there are times when it's well worth looking at that past record. Home Depot (HD 0.67%) is one of those investments that qualifies. Not just because of its hugely successful business, but also because of how it shares that success with investors. I can illustrate that with a personal story. 

I purchased shares in Home Depot just over 20 years ago. While the share-price appreciation alone has provided a healthy 14% annual return over those two decades, that's not the only benefit I'll get in retirement. The stock offered just a 1.2% annual dividend yield on that purchase in 2003. But management has steadily raised its dividend as the business has thrived. 

HD Dividend Chart

HD dividend data by YCharts.

Now Home Depot's current dividend yields 40% on my initial investment. Put another way, if you invested $10,000 in Home Depot stock in early 2003, you would now be collecting more than $4,000 per year in dividend payments. 

That's a helpful income stream to have in retirement. And Home Depot's business doesn't show any signs of slowing down. It has made a recent push into the professional segment to complement its residential housing customers. New homes will continue to be built and older homes will need to be maintained. The share price should continue to move higher as its business continues to grow. 

That would make Home Depot not just a great income investment for retirement, but also one where a capital investment can grow along the way as well. There's no reason to think the past performance of the company won't also translate into more positive future results.