Wal-Mart (WMT 0.36%) has no obligation to contribute to charitable causes or to give a single dime, any in-kind donations, or a even a minute of employee time to those in need. However, the world's biggest retailer does do those things. In 2016, it contributed more than $1.4 billion in cash and in-kind gifts (donations of goods and services) to various causes, according to the company's 2016 Giving Report (link open PDF). In addition, Wal-Mart employees ("associates," in company lingo) "contributed more than 1.25 million hours of their time outside of work to volunteer causes."

Less than a third of the company's total giving actually comes in the form of cash (over $300 million), but Wal-Mart, which does not have the same reputation for being charitable as Starbucks (NASDAQ: SBUX) or Alphabet (NASDAQ: GOOG) (NASDAQ: GOOGL), perhaps deserves to be viewed differently. Of course, Wal-Mart does top the Global Fortune 500, which measures total revenue, with $482 billion in 2015.

Wal-Mart donated over $300 million to charities in 2016. Image source: Wal-Mart.

How does Wal-Mart stack up?

In 2015, Wal-Mart placed second on Fortune's 20 Most Generous Companies on the Fortune 500 list (the 2016 list has not been released yet). In 2015, Wal-Mart gave just over $300 million in cash contributions to a variety of causes. That's more than Alphabet ($167.8 milion) and Starbucks put together since the coffee company did not make the top 20, which required beating out $62.5 million in cash donations.

For perspective, Wal-Mart rival Target (NYSE: TGT) gave away $111.5 million in cash in 2015. That's a little less than a third of what its competitor handed out, but a higher percentage of the chain's nearly $75 billion in revenue. In-kind donations do take the Wal-Mart number much higher, but that's not a number every (or even many) companies report.

Is Wal-Mart generous?

While on a percentage-of-revenue basis Wal-Mart does not hand out as much as many rivals, its overall generosity depends upon how you view in-kind donations. On one hand, this type of charity, of which Wal-Mart takes credit for about $1.1 billion in 2016, could simply be the company donating items it has little use for.

Some of that $1.1 billion likely comes from Wal-Mart moving dead inventory or donating food nearing its expiration date to local food banks. A cynic might consider that not actual charity, but in reality, it takes significant effort and cost to implement the programs that transfer items or food to charities once they are no longer saleable. It's also very likely that some, maybe a lot, of the company's in-kind donations are to meet needs with little or no concern to moving dead product off of shelves.

Wal-Mart had $4.6 billion in profit in Q4 of fiscal 2016, and it made $9.88 billion through the first three quarters of fiscal 2017. That means that roughly, on a four-quarter basis, the company would have made about $14.5 billion. If you consider $1.1 billion an accurate value for its in-kind charitable contributions, that's about 7.5% of profits being donated. If you use the cash number, it's 2% of that profit number.

Wal-Mart deserves recognition

While it's easy to fault Wal-Mart for its wages or employment practices (though it has made some strides in those areas), it's not fair to not celebrate the company when it does something positive. The chain may have its problems, and it has not always make the choice that results in the greater good, but that's not its primary responsibility to shareholders.

You can quibble about the accounting or argue what actually counts as charity, but if the company was not sincere, it's hard to see why it would go through these efforts. Kathleen McLaughlin, Wal-Mart's chief sustainability officer, wrote a letter to begin the report, and she clearly believes in what she's doing:

Philanthropy enables Wal-Mart to go even further in addressing some of the world's toughest social and environmental challenges. Likewise, being able to draw on Walmart business strengths -- not just funding, but Walmart's reach, relationships, associates, logistics, technology, products and stores, to name a few -- enables our philanthropy to deliver greater societal impact. We believe this ability to bring private-sector capabilities to bear on social problems makes corporate philanthropists important collaborators in social change.

Wal-Mart, on a cash basis, regularly gives more money than almost every other company on the planet. That may not be as much cash on a percentage of revenue or profit basis as some of its rivals, but it's still a lot of money, and the company should be saluted for what it does, even if you hope it will do more in the future.