For most of the past five decades, Wal-Mart (NYSE:WMT) has been the retailer competitors feared most and as a result it made for a phenomenal investment for its shareholders. But Wal-Mart has begun to lose its cache with consumers and major holes are starting to form in its business.

Interestingly, Wal-Mart has hidden its financial problems from the headlines because challenges are different around the world, masking themselves in the overall picture. But when you dig between the headlines you can see a company in serious trouble and could be the latest in a long line of leading retailers to go from boom to bust in the blink of an eye.

U.S. shoppers are abandoning Wal-Mart

The most alarming statistic at home in the U.S. comes from falling same-store sales. This measures how sales are growing location by location and any healthy retailer is looking to grow same-store sales at or faster than consumer spending grows because that shows increased market share locally. Overall sales can be increased by increasing store count, but if same-store sales are falling then the return on each store will drop, something well see in a minute.

Below, I've built a table that shows year-over-year changes in same-store sales at U.S. Wal-Mart and Sam's Club stores compared to the growth in consumer spending on goods. You can see that Wal-Mart is growing far slower than what consumers spend on goods and has been consistently negative over the past year.

2013 Q1 2014 Q2 2014 Q3 2014 Q4 2014 Wal-Mart 1.8% -1.4% -0.3% -0.3% -0.4% Sam's Club 2.2% -1.2% 0.1% -0.2% -0.4% Consumer Spending-Goods 3.1% 3.7% 3.1% 4.5% 2.9%

The problem for Wal-Mart goes far further than just cyclical swings in retail or a weak economy. Wal-Mart has long been able to lure customers with one-stop shopping and low prices, but consumer trends are now working against that core strategy. For cost conscious shoppers, lower prices can often be found online and more affluent consumers are choosing style and quality products over one-stop shopping. This can be seen clearly by the growth in online retailers like Amazon.com as well as specialty retailers like Williams-Sonoma , Lululemon, and Michael Kors, among others.

Foreign failures don't help the problem

Here's where Wal-Mart's story gets really interesting. Sales in the U.S. are beginning to struggle, but overseas the company's profitability is in downright freefall. I highlighted this in an article a couple of weeks ago and the table below shows just how fast margins are falling internationally.

High margins in the U.S. have masked profit struggles overseas and store growth in some international locations is masking U.S. struggles from the revenue side. So, when you look at Wal-Mart's overall profitability it's hard to see any problems emerging.

But there's only so far you can push margins in the U.S. before you either start losing sales to lower cost competitors or you have to lower prices. So, eventually profits could decline in the U.S. and that's when the warts will truly show.

Wal-Mart's high returns are falling like a rock

The most startling evidence of Wal-Mart's decline comes from Wal-Mart itself. Each year, the company provides a return on investment calculation for investors, which measures the profit Wal-Mart makes from the money it invests in stores, inventory, and other infrastructure.

You can see below that Wal-Mart's ROI is dropping rapidly since 2010, despite the broader economy recovering over that time.

If ROI continues to decline, Wal-Mart could become unprofitable very rapidly. Falling same-store sales and plummeting returns are how Sears, Kmart, or Montgomery Ward, became former retail icons that were eventually overtaken by competitors. These two trends can only last so long before something has to be done.

Is Wal-Mart in serious trouble?

Wal-Mart's traditional supercenter business model is clearly showing major signs of weakness both in the U.S. and overseas. If the retail giant can't adapt to new competition like online, specialty, and local retailers there's a real chance the company is in danger of heading down a downward spiral we've seen so many retailers go down before.

There are efforts to introduce smaller footprint stores closer to consumers but that's a stretch for a business that's operated one way for decades. Many major retailers have problems adapting to shifts in the way consumers buy products, which is one reason you don't shop at the same stores your grandparents did 50 years ago.

From an investment perspective, I think Wal-Mart is going to be a loser long-term, because of the challenges I've outlined above. Returns are falling, Wal-Mart is struggling overseas, U.S. consumers are shopping elsewhere, and the success of new formats is uncertain.

Time will tell if Wal-Mart can turn around but I'd stay out of the stock and would even consider shorting shares if operations continue to struggle.