If you have $20,000 or more in savings that you can afford to invest in stocks, you may want to consider putting that in some high-yielding investments that can provide you with some great recurring income.

Viatris (VTRS 0.80%) and AT&T (T 1.01%) are two solid dividend stocks with yields of around 5% that can generate some valuable dividend income as part of a diversified portfolio. Here's a closer look at why these stocks could be underrated buys right now.

1. Viatris -- $8,000

Drugmaker Viatris pays a high dividend yield of around 5% today. That's close to three times the S&P 500 average of 1.7%. If you invested $8,000 into the healthcare stock, that would generate approximately $400 in annual dividend income. 

Investors have been wary of investing in Viatris, which is evident given that the stock is trading at around 0.6 times its book value, due to the company's high debt load. At $19.3 billion, its debt is nearly twice the value of its current assets ($10.6 billion).

But the company has retired $5.4 billion in debt since 2021. And Viatris also generates strong free cash flow, which should enable it to pay down more debt while still being able to support its dividend payments. For 2023, the drugmaker anticipates free cash flow to be between $2.3 billion and $2.7 billion. Even at the low end of that range, that's about 4 times how much it pays in dividends over the course of a year ($582 million).

Viatris can make for a good cheap stock to own because its operations should remain resilient. In 2022, sales of $16.2 billion were down 9%, which was largely due to foreign exchange; the company provides medicines to patients in 165-plus countries and territories around the world. When factoring out foreign exchange, its top line declined just 2%.

Viatris' generic and branded drugs, including top-selling cholesterol drug Lipitor, are essential to patients and can ensure that the business does well regardless of macroeconomic conditions. That stability combined with a high-yielding dividend can make the stock an ideal place to invest in right now if you want to collect a strong payout.

2. AT&T -- $12,000

Telecom giant AT&T is another solid pick for a dividend investment. It yields 6.1% and can give you even more dividend income than Viatris. Investing $12,000 into the stock would provide you with approximately $730 in dividends over the course of a full year. When combined with the $400 in dividends you'd get from Viatris, that would bring your annual dividend income to over $1,100.

As with Viatris, there is some concern from investors about the safety of this dividend. Shares of AT&T fell last week after the company reported its latest earnings results. Its free cash flow of $1 billion for the quarter (ended March 31) was insufficient to cover its dividend payments, which totaled just over $2 billion. That's a bit of a shortfall, but cash flow can and will fluctuate from one period to the next -- in the previous quarter, AT&T's free cash flow was $6.1 billion. And for 2023, the company forecast up to $16 billion in free cash flow, which comes out to an average of $4 billion per quarter.

While the recent results may be troubling, investors shouldn't overreact due to one quarter. The business hasn't raised any red flags and what's positive is that it is still growing; revenue of $30.1 billion for the period was up 1.4% year over year, and AT&T reported its 11th straight quarter of at least 400,000 net additions in its postpaid business, as well as 13 consecutive quarters of at least 200,000 net additions to AT&T Fiber.

Overall, this is still a good dividend stock to own and one that can provide investors with some great recurring income.