There's little denying that AT&T (NYSE:T) stock has been, at best, a frustrating investment. The stock is down 16% over the last year (although that share price decline is somewhat offset by the fact that the company pays a large dividend) and is even down nearly 11% over the last five years. 

Frontier Communications (NASDAQ:FTR), however, has been a far worse bet. The stock has shed more than 65% of its value over the last year, with that figure coming in at 97% over the last five years. By contrast, AT&T's relatively lackluster market performance actually looks really good.

A jar with a label on it that reads: "dividends"

Image source: Getty Images.

However, the past is the past, and investors evaluating the two stocks today should have one simple question: Which stock is the better buy? In my book, the answer is clear: AT&T. Here's why.

AT&T isn't going to wipe you out

AT&T isn't in any danger of going under in the foreseeable future. While the company does carry a significant debt load -- $171 billion at the end of 2018 -- the company also rakes in a massive amount of free cash flow with which it can easily service that debt. AT&T generated $22.4 billion in free cash flow in 2018. 

At the same time, even if the stock isn't exactly likely to provide you with massive capital gains -- remember that the stock has been a poor performer over both the last year as well as the last five years -- the stock currently offers a dividend yield of 6.65%. Even if AT&T didn't raise its dividend at all, something that's unlikely given its history of annual dividend increases, investors would be able to double their money by just holding the stock for about 11 years. 

With dividend increases, that doubling could happen even sooner -- and all of that assumes a flat share price. (If AT&T stock appreciates in value as well, that could further sweeten the potential returns.)

Frontier, on the other hand, looks like a very high-risk -- though, admittedly, high-reward -- stock. I recently compared it to AT&T rival Verizon (NYSE:VZ) and concluded that although Frontier has significant upside potential if things go well for it, the risks it faces aren't nearly as palatable as they are for larger carriers like Verizon. At that time, Frontier shares traded for $2.33. After the company reported earnings results that were positively received, the stock rocketed to about $3.12 per share -- a nearly 34% return. The shares have given up those gains, though, and most recently closed at $2.42. 

Put simply, Frontier Communications is a turnaround play that's saddled with an unhealthy amount of debt. While the company is making progress on its turnaround -- its revenues are holding steady, and it continues to cut costs (last quarter, its operating expenses dropped by nearly $2 billion from the same period in the prior year) -- it's still a struggling business that's by no means out of the woods.

Check out the latest earnings call transcripts for AT&T and Frontier Communications.

Taking the surer bet

If Frontier Communications is able to achieve its desired cost structure reductions and, ultimately, put itself on firmer financial footing, then it wouldn't surprise me to see the stock rise significantly from here. By the same token, there's still a lot of downside risk if things don't go as hoped.

AT&T isn't the most exciting stock; I don't think it's the kind of stock that investors looking for share price appreciation that consistently outpaces the overall market should seriously consider. However, the business is fundamentally sound, and the dividend is so generous that, over the long term, investors who buy the stock today stand a good chance of generating a positive return on their investments over a sufficiently long period of time. The same can't be said for Frontier Communications.