Many companies are increasingly using their capital to repurchase stock. According to data from Birinyi Associates, U.S. companies have authorized a gargantuan $599 billion in buybacks during the first eight months of 2015. This is a historical record and a big increase of 40% from the same period last year.

Investors need to pay close attention to buybacks, while some companies are putting their money to good use, others are destroying shareholder value with this practice.

What is a good share buyback program?
Buybacks are a mechanism to return capital to investors. When a company buys its own stock, the amount of shares outstanding is reduced, so each stock is theoretically worth more money, since it now represents a bigger percentage of the company's cash flows and earnings. 

Warren Buffett is perhaps the most successful investor ever and one of the biggest world experts in capital allocation matters, so he knows how to differentiate between productive and destructive buybacks. In Warren Buffett's own words, from Berkshire Hathaway's (BRK.A -1.05%) (BRK.B -0.83%) annual report for 2011:

Charlie and I favor repurchases when two conditions are met: first, a company has ample funds to take care of the operational and liquidity needs of its business; second, its stock is selling at a material discount to the company's intrinsic business value, conservatively calculated.

Under this rationale, Buffett has designed for Berkshire Hathaway a clear and straightforward share buyback policy. Berkshire Hathaway will repurchase stock under two conditions: the company must have more than $20 billion in excess cash at hand and the stock must also be trading at an attractive valuation, which Buffett has defined as a price to book value ratio below 1.2.

Berkshire Hathaway has not remained cheap enough for long periods of time, so buybacks have been almost insignificant. However, investors in Berkshire Hathaway can sleep well at night knowing that the company will only repurchase stock when the right conditions are met.

When buybacks are hurting investors
Unfortunately, not every company has such a smart and well-defined share buyback policy. Wal-Mart (WMT -0.15%) has been facing considerable challenges, lately. The retail environment is savagely competitive due to increasing pressure from online players and consumers demanding big pricing discounts across all product categories.

Wal-Mart has underinvested in its operations for a long time and this is having a negative impact on customer perception and the overall shopping experience. At the same time, the company has allocated big amounts of money to share buybacks, Wal-Mart repurchased stock for nearly $1.7 billion over the last three quarters, and management has recently announced a new buyback program for $20 billion over two years.

Due to disappointing sales performance, Wal-Mart has delivered dismal returns for investors, the stock has lost nearly 30% in the last year, and returns are also negative over a three-year period. This means the company should have invested more money in improving its business as opposed to repurchasing stock at prices, which turned out to be excessively high. Management has recently announced increased spending in people and technology, so hopefully Wal-Mart is learning the lesson.

Qualcomm (QCOM -0.74%) is another company that has done material damage to investors with its share buybacks over the last several years. The company is losing ground in the always changing chips industry, and sales declined 18% during the September quarter. For the coming quarter, Qualcomm is expecting a big annual decline in revenue of between 15% and 27%. 

Qualcomm stock has lost over 10% including dividends since 2013, and the stock has declined over 25% in the last year alone. Management is investing big sums of money in stock buybacks, Qualcomm allocated $11.2 million to share repurchases during the year ended in September. However, that money would arguably be better invested in research and development to jump-start growth.

Repurchases are neither a good or bad thing for investors on a stand-alone basis. Depending on factors like the company's fundamentals and the valuation of the stock, they can be an efficient way to distribute capital to investors or a destructive policy focused on short term goals. Now that buybacks are very much in fashion, it's increasingly important to differentiate the smart from the destructive ones.