Blue-chip retailer Wal-Mart (WMT -0.65%) has a long history of returning excess capital to shareholders -- a commitment it underscored last year by announcing a new $15 billion share repurchase authorization. The new authorization came as the company neared the end of its previous $15 billion authorization, which had dwindled to having just $712 million left after just two years. The new $15 billion authorization replaced the previous one and has no expiration date.

Now that the company is on track to spend billions of dollars more repurchasing shares, it's worth remembering that not all buybacks are good for shareholders. On the surface, repurchases look great: As shares are repurchased, fewer total shares remain outstanding, so earnings per share increase even if the company doesn't grow. However, shareholders can get robbed if repurchases are done at high prices or if there is a better use of the capital. Let's take a look inside Wal-Mart to see if the company's buyback plan adds or subtracts shareholder value.

Investment opportunities
Each year, Wal-Mart generates over $23 billion in cash from operations. The company has three main options for the use of cash: maintain and grow its business, repay debt, and return capital to shareholders. Shareholders are best served when cash is used in a manner that maximizes long-term return on investment.

In 2013, Wal-Mart spent $13 billion to maintain and grow its business. The company will likely spend at least as much in the coming years as it grows its global store base and expands into new channels in the U.S. For instance, the company is expanding its smaller-format Neighborhood Market and Express stores to compete with deep-discount retailers. It is also boosting its e-commerce presence to compete with online retailers.

Wal-Mart will continue to invest as much as possible in its business, but its ubiquitous presence in the U.S. and tough competition abroad put a limit on how much it can profitably invest in growth. As a result, significant cash must be directed toward other activities.

Squeaky-clean balance sheet
Last year, Wal-Mart used $5 billion to repay long-term debt, but it issued $7 billion in new debt for a net increase of $2 billion. Debt often gets a bad rap -- sometimes deserved -- but Wal-Mart has a pristine balance sheet and can afford it. The company had about $45 billion in net debt at the end of July, its most recent reporting period. If it needed to, Wal-Mart could pay off its entire debt balance in less than two years. This is a relatively safe debt burden, so shareholders should not be concerned about the balance sheet.

Returning capital to shareholders
The best thing about Wal-Mart's strong balance sheet is that it allows the company to distribute billions to shareholders instead of having to use the cash flow to pay back debt. Last year, Wal-Mart spent $6.7 billion to repurchase stock and $6.1 billion to pay dividends. The company has repurchased $933 million in stock and paid $3 billion in dividends through the first two quarters of fiscal 2015.

At 15.6 times earnings, Wal-Mart's stock does not appear too expensive. Actually, it might be better -- and more tax-efficient -- to return more cash via share repurchases and less via dividends. However, many of Wal-Mart's shareholders would rather have a check in their account each quarter, so the company is sticking by its dividend policy.

Wal-Mart's share count has decreased at a decent clip over the last six years and earnings per share have generally increased.

WMT Average Diluted Shares Outstanding (Quarterly) Chart

Wal-Mart data by YCharts

Shareholders would be best-served if Wal-Mart continues to make significant repurchases and executes its growth plans in the U.S. and abroad. If the company decides in the coming years to return an even greater percentage of capital to shareholders, long-term owners will be greatly rewarded. So, investors should not be concerned about Wal-Mart repurchasing too much stock -- instead, they should be concerned about the company not repurchasing enough shares. However, the company's large repurchase authorization and history of buybacks should put long-term investors' minds at ease.