Consumer electronics retailer Best Buy (NYSE:BBY) has maintained its dividend payment throughout its turnaround efforts over the past few years, even as the stock fell to a decade-low in 2012 and talk of bankruptcy became all too common. In fact, the company raised its dividend just a few months ago by about 12% -- from $0.17 per quarter to $0.19 -- a move that seemed illogical to some. In contrast, smaller competitor RadioShack (NYSE:RSHCQ) suspended its dividend in 2012; that company is now on the verge of bankruptcy.

Best Buy certainly has its fair share of problems. Sales are still declining, and a lack of new, exciting products is causing problems for the entire consumer electronics industry. However, there is little question the company is in far better shape today than it was a few years ago. Should investors worry that Best Buy will be forced to slash its dividend? Or is that payout, currently yielding 2.35%, perfectly safe? Let's take a look.

The value of cash
Best Buy's balance sheet has greatly improved in recent years. The company stopped buying back its own shares after spending $2.7 billion during fiscal 2011 and 2012, and the sale of Best Buy Europe in early 2013 added hundreds of millions of dollars in cash to the company's coffers. Here's how Best Buy's cash levels have changed over the past few years:

Bby Cash

Source: Best Buy.

Seasonal fluctuations are normal for retailers, with cash being used to buy inventory prior to the holiday season, but Best Buy was in a bit of a precarious situation during fiscal 2013, which ended in January of that year. Steps taken by management since then have prepared the retailer to weather nearly any storm, with about $3 billion in cash and investments in the bank. The company still has some $1.6 billion in debt, but almost all of this is long term, and it represents an improvement from debt levels closer to $2 billion in early 2013.

Based on the most recently announced quarterly dividend payment of $0.19 per share, over the next year Best Buy will pay out about $267 million in dividends to investors. The current cash balance sits at 11 times this amount, and even the net cash balance is enough to cover the dividend for more than five years. In the near term, then, there is no real risk that Best Buy will have to cut its dividend.

The second part of the story
While a big pile of cash is nice, it doesn't guarantee the dividend is sustainable in the long term. Ultimately, Best Buy must turn an annual profit that covers the dividend; coming up short would result in the cash balance slowly dwindling over time. This is exactly what happened to RadioShack.

At the end of 2009, RadioShack had about $900 million in cash and was profitable. By 2011, earnings began to decline, turning negative in 2012 and extremely negative in 2013. Meanwhile, the company's cash balance dwindled to just $62 million as of the most recent quarter. RadioShack actually doubled its dividend in 2011, only to completely suspend it midway through 2012.

Best Buy, however, is in a radically different situation. While the company's sales have declined recently, profitability has started to improve. During the most recent quarter, non-generally accepted accounting principles earnings, which exclude one-time items, rose nearly 38% to $0.44 per share. During the first two quarters of this year, Best Buy's total non-GAAP earnings have already completely covered the annual dividend.

During the previous fiscal year, non-GAAP EPS was $2.07, putting the payout ratio based on the current dividend at about 37%. With earnings on pace to rise this year, Best Buy actually has room to raise its dividend further. There is always the chance that things fall apart, much like they did at RadioShack. However, with Best Buy maintaining its market share during the past couple of quarters despite a weak consumer electronics market, it's clear consumers aren't abandoning this company in the same way they have given up on RadioShack.

The takeaway
Unless there is a dramatic deterioration in Best Buy's profitability going forward, investors have little to fear about the safety of the dividend. Best Buy has done an excellent job remaining profitable during its turnaround, and billions of dollars in cash will protect the payout even if the company does worse than expected.

Timothy Green owns shares of Best Buy. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.