While high-growth, meme, and cryptocurrency stocks get all the attention these days, cloud giant Microsoft (MSFT -0.74%) just continues to do what it's always done under CEO Satya Nadella: mint money and return it to shareholders.

While younger investors can definitely afford to take more risks, they shouldn't discount the tech behemoth from Redmond. Similarly, older investors looking for value stocks and dividends shouldn't dismiss Microsoft either. Is the stock cheap? At a 38 price-to-earnings ratio, one may be hard-pressed to say that. Does it have a high dividend? At 0.81%, that payout may leave dividend investors underwhelmed.

Yet both younger and older investors would do well to own Microsoft shares. The company's recent buyback and dividend hike just illustrated why.

Young businessperson has cash rain down on them with arms outstretched.

Image source: Getty Images.

$100 billion coming to shareholders over the next two years

On Sept. 14, Microsoft's board of directors approved a new $60 billion repurchase program and an 11% raise in its dividend to $0.62 per quarter. Based on roughly 7.51 billion shares as of the end of July, this year's dividend payout could reach about $18.6 billion, an increase over the $16.5 billion the company paid in dividends in its fiscal 2021 that ended in June.

And if you love dividends, you should also love share repurchases. When a company repurchases its own stock, it lowers the share count, thereby increasing earnings per share and usually, the stock price. Thinking like an owner, repurchases increase your ownership of the business without you lifting a finger! And while there has been some discussion in Washington around taxing share repurchases, companies don't pay taxes when they return cash to shareholders via repurchases as of now.

Perhaps these reasons are why Microsoft has spent even more money on share repurchases in recent years, shelling out $27.4 billion to repurchase stock in its fiscal 2021. The new $60 billion repurchase program marks a whopping 50% increase over the $40 billion plans approved in 2016 and 2019.

Assuming share repurchases continue to increase this year, as they have each of the last few years, Microsoft could very easily spend that $60 billion in just two years. And if it hikes its dividend, as it has for each of the last 16 years, the two-year total return to shareholders could reach $100 billion -- more than the market cap of most companies in the S&P 500.

Smiling young child and smiling senior citizen look at a jar full of coins.

Microsoft is an appropriate investment for the young and old alike. Image source: Getty Images.

Young and old shouldn't overlook Microsoft

While Microsoft may seem too "defensive" for younger investors, those just starting out on their investing journey shouldn't discount a dividend growth juggernaut like Microsoft. That's because not only is Microsoft a dividend payer, but it's a growth stock as well.

While its Windows and Office software businesses have been around for decades, Microsoft also has very promising growth segments, such as its Azure Cloud computing platform, its Dynamics 365 enterprise resource planning suite, the LinkedIn social network, and its Xbox gaming platform. Many of its emerging growth segments surged 20%, 30%, 40%, or even 50% last quarter, with a long growth runway ahead of them.

That growth is nothing to sneeze at, and while the company's forward yield of around 0.81% may not raise any eyebrows, Microsoft's payout ratio is only 27.2% of its trailing earnings. That leaves a lot of room not only for that dividend to grow in line with Microsoft's earnings over the long-term, but to actually exceed them.

So, say you're 25 and intend to retire at 65. Should Microsoft's dividend compound be that same 11% for 40 years, by the time you reach retirement, you would be earning a 52% dividend yield every year on the money you invested today.

And for retirees, Microsoft shouldn't be dismissed either. It's large, defensive, and with the U.S. 10-year Treasury bond hovering around 1.3%, a 0.81% yield that's near-certain to grow every year is actually attractive. That's especially true since Microsoft actually has a higher credit rating than the U.S. government! 

So while Microsoft occupies somewhat of a "middle ground" -- maybe too defensive for youngsters, and not enough yield for retirees -- the recent dividend and repurchase hike actually show its an ideal stock for both types of investors. Ignore Microsoft at your portfolio's peril.