If you are at least five years away from retirement, investing in stocks is a great way to build wealth for your eventual transition out of the working world.

Ideally, for a retirement nest egg, you'd do well to pick stocks that you can hold for 10 years or more. Given that perspective, you'll want to select companies that are playing into long-term trends and have a solid reputation for growth. Home Depot (NYSE:HD), Mastercard (NYSE:MA), and Teladoc Health (NYSE:TDOC) are three stocks that check both those boxes. Let's find out a bit more about each of these companies and why they might make good investments to build retirement wealth.

HD Chart

Note: Chart starts on July 1, 2015, when Teledoc went public. HD data by YCharts

1. Home Depot: Owning a house will never go out of style

Home Depot has been helping homeowners and professionals buy supplies to build and maintain their homes and offices since 1978. It has 2,290 stores across North America and is growing despite the threat of online retail competition.

With its "One Home Depot" initiative, the company is striving for excellent customer service regardless of whether you shop online or in stores.

Capabilities such as using its app to help find items inside the store, returning items bought online to a physical store, and picking up items from the store that were purchased online are all ways it's making it easier for consumers to make transactions.

Old fashioned alarm clock next to stacks of coins with a glass jar full of coins labeled retirement.

Image source: Getty Images.

The company just finished its 2019 fiscal year in record-breaking style. Sales topped $110 billion on a year-over-year growth of 3.5%, with comparable same-store sales hitting an impressive 5.3%.

Digital ordering grew 21.4% over the previous year, and more than 50% of its online orders are picked up in the store. Over the last five years, it has grown same-store sales in excess of 5% every year, full-year earnings per share have increased 88% to $10.25, and the stock has more than doubled.

With almost 80% of U.S. homes over 20 years old, many will turn to Home Depot to help refresh or repair the place where they live for years to come. Combined with impressive stock growth, the company has been paying out a growing dividend over the last 11 years. Add in a dividend yield of 2.56% and a Dividend Reinvestment Program, this stock is a great way to build a solid foundation for your retirement portfolio.

2. Mastercard: Facilitating commerce around the globe

Mastercard is a global payment processor that issues credit cards to consumers and businesses. Its cards were used 108 billion times last year to purchase almost $6.5 billion of goods and services in 210 countries and territories. Impressively, that's a 19.9% year-over-year growth in transactions and a 9.6% growth in dollar value.

Mastercard makes money primarily by taking a small piece of every transaction it processes. It racked up $12.8 billion in transaction processing and cross border fees in 2019, up 10% from the previous year. But it's also expanding into other businesses such as data analytics, cyber and intelligence products to detect fraud, loyalty and rewards services, and program management services. This segment made up $4.1 billion of its total $16.9 billion top line last year and grew at an impressive 23% clip year-over-year. 

The stock is up over 200% in the last 4.5 years and has been paying a rising dividend for nine years  with a dividend yield of 0.45%. Since cash is still the primary way commerce is done around the globe, this company has a bright future ahead, and its stock could help fund your retirement years.

3. Teledoc: Making it easier to see your health professional 

Twenty years ago, working from home was really not an option with slow-speed dial-up internet connections and expensive laptops. But since then, technology has advanced and is making remote work easy and more productive.

Today, this same technology is making it possible for doctor visits to happen remotely too. Even though you might not have used Teledoc's services to connect with a medical professional from home or your mobile device, telemedicine is an undeniable trend that is here to stay.

Teledoc started in 2002 in Texas, went nationwide in 2005, and today serves patients in more than 175 countries and 40 languages. Last year, Teledoc facilitated 4.1 million telehealth "visits," which was up an impressive 57% from 2018.

The company captured $553 million in full-year revenue, growing 32% over the previous year. Most of its revenue (87%) comes via business-to-business subscriptions for insurers and corporate customers on behalf of their insured employees. The remaining revenue comes from fee-only visits where a client isn't part of a larger group program.

Although it's not paying a dividend, the stock has grown over 300% since its IPO in 2015. But it's not done growing, and the best days for this company may be yet to come. Global Market Insights estimates the total telemedicine market could be $130 billion by 2025, giving this market leader plenty of room to run. Looking back 20 years from now, it's likely that your future self will be happy that you added this stock to your retirement account.

The bottom line for investors looking to retire

Whether it's a solid dividend payer like Home Depot, a growth company taking advantage of technology like Teledoc, or Mastercard, which offers both growth and dividends, any of these three stocks could be a great way to start or add to your retirement portfolio.

With many brokerages offering free trades and the opportunity to buy fractional shares of stock, it's easier now than ever to get started (even with as little as $500).