If you're five years or more from retirement, you might find yourself at a crossroads. While those in retirement should probably opt for lower-risk dividend-paying stocks such as utilities and consumer staples, those earlier in life can take some swings at the finest growth stocks around, without concern for near-term payouts. But if you're approaching retirement in the next five to 20 years, which side should you prefer?

Why not both?

Investors of all kinds can benefit from dividend growth stocks. These stocks might not have the highest payout today, but they're still growing, meaning that both their share prices and their dividends are likely to increase over the long-term. In fact, with the average life expectancy rising to almost 79 years old as of 2018, even those just entering retirement could benefit from adding dividend growth companies to their portfolios today.

For those closing in on retirement, it's especially important to focus on such dividend-growth companies with wide economic moats, or competitive advantages over rivals, that ensures their staying power. In addition, you want to make sure these companies are in strong growth industries.

The following three stocks check all these boxes in spades.  

A retiree sits on his sailboat in the ocean.

Image source: Getty Images.

Microsoft

Microsoft (MSFT 0.59%) has been one of the top stocks to buy and hold over the past decade. Under CEO Satya Nadella, who took over in 2014, the software and operating system specialist has either built or bought its way into several new emerging growth markets such as cloud computing, social networking, video games, cybersecurity, and more. While typically known for its core Windows operating system and Office software, Microsoft is now a tech conglomerate with several profitable and growing businesses, including its Azure cloud infrastructure service, Dynamics 365 enterprise software, the LinkedIn social network, the Xbox gaming platform, and the GitHub coding repository.

Microsoft's products are not only benefiting from the growth in digital transformation going on at enterprises large and small, but they're also extremely profitable as well. Last quarter, Microsoft grew revenue 13.7%, impressive for such a large company, and with several of its best businesses growing much faster than that.

But the real story is the massive operating leverage Microsoft is achieving, leading to even bigger profit growth. While revenue is only growing in the mid-teens, operating profits grew 35.4% last quarter and earnings per share grew a stunning 38.3%! That's because Microsoft is now able to grow its top line without very much incremental investment, and the company's operating margins have expanded to a whopping 36.7%.

Currently, Microsoft's dividend yield is just 1.25%, which may not sound like much. However, considering the stock's incredible 165% total return over the last three years, I don't think investors would complain. And with just a 33% payout ratio, Microsoft's dividend has ample room to grow by double-digits on an annual basis for the foreseeable future.

ASML Holdings

One name of which many Americans might be aware is European semiconductor equipment specialist ASML Holdings (ASML 1.83%). ASML makes semiconductor manufacturing equipment for both memory and logic and foundry chips. Its main products are its deep ultraviolet lithography tools, which help etch extremely fine patterns on a surface, without disturbing the remaining material. These lasers are absolutely critical to manufacturing finer and finer transistors, which make for smaller yet denser and more powerful chips.

Recently, chip sizes have been getting so small that the amount of etching required has begun to overwhelm even these advanced traditional tools. Fortunately, ASML has developed a new technology over many years called extreme ultraviolet lithography (EUV), in which an even more powerful laser etches even tinier patterns on a semiconductor wafer than previously possible, and in a shorter amount of time.

EUV was developed by ASML just in time for the recent 7nm chips coming out of today's leading foundries such as Taiwan Semiconductor Manufacturing (TSM 4.53%), for which EUV has been a critical enabler. Basically, EUV is now a core technology required to make today's leading-edge semiconductors as the industry moves on to 5nm chips, then 3nm, and beyond.

In addition, South Korean tech giant Samsung (OTC: SSNLF) recently announced its first DRAM modules shipped with EUV technology in late March. So beyond just logic and foundry chips, the DRAM industry is just beginning its first adoption of EUV technology.

The best part? ASML is the sole provider of EUV technology.

Two wine glasses clink in front of a setting sun.

Image source: Getty Images.

Having a monopoly for a mission-critical technology is why ASML's stock nearly doubled last year, and currently trades around 40 times earnings. However, with a long runway for growth and expanding profits from EUV adoption over the next decade (at least), that price appears more than justified.

ASML pays out a dividend that yields just 1.1%, but that dividend has sextupled over the past decade. While the dividend may not grow quite as fast over the coming decade, it will certainly be much higher five or 10 years from now, meaning ASML is a fine choice for those looking at retirement in the next decade or two.

ASML recently announced some shipment delays in the first quarter due to the COVID-19 outbreak. However, with a huge backlog and the need for smaller, faster chips only accelerating, those dollars should be made up in subsequent quarters, not lost. That makes the recent sell-off a nice opportunity to pick up some ASML for the long-term.

Starbucks

Finally, another stock that's given up a lot of its share price in the coronavirus downturn is Starbucks (SBUX 0.57%), although it has also recouped a good amount of those losses in recent days. Most know Starbucks and its terrific track record of wealth creation. Currently, the stock yields 2.3% and trades at around 24 times earnings.

No doubt, those earnings are going to fall hard over the next quarter and maybe even the entire year. The company just revealed that its same store sales plunged 60-70% in the last week of March in the U.S. However, in China, same store sales improved to negative 42% in the last week of March, over the negative 90% at the height of the Chinese lockdown in early to mid-February.

In these uncertain times, Starbucks' brand and digital capabilities should allow it to weather the coronavirus storm and thrive once the crisis is resolved. The company's best-in-class app and loyalty program had yielded strong performance in the quarter before COVID-19 struck, with U.S. same-store sales up a whopping 8% prior to the outbreak on March 11.

Starbucks also said that it has $2.5 billion in cash, which should be enough to weather a couple bad quarters, as well as another $3.5 billion in revolving credit facilities if need be. Importantly, management doesn't plan on cutting the company's dividend.

Starbucks' stock has had a nice bounce-back so far, but the long-term picture in both the U.S. and especially China appears bright. In fact, Starbucks' main rival in China, Luckin Coffee (LKNC.Y -0.55%), recently found itself embroiled in a scandal in which management was caught fabricating sales. That seems to indicate Luckin is either not a very strong competitor, or at least its reputation may be sullied for the foreseeable future. Thus, Starbucks' brand strength in both the U.S. and China makes it a compelling long-term buy, especially if the stock pulls back to the $60s or $50s.