The wealth-building power of compound interest will never cease to amaze me. It's a story of patience and attention to detail, where small, short-term differences add up to massive divergence over decades. And in the end, the biggest winners don't always deliver the fattest share-price returns.

Retail giant Wal-Mart (NYSE:WMT) has traded largely sideways for more than a decade. But the company never stopped boosting its dividends on an annual basis, so the effective yield is going places:

WMT Dividend Chart

WMT Dividend data by YCharts.

Wal-Mart has ascended from an insignificant yield of less than 1% to a meaty 2.6% in just a few years. Without these payouts, the stock would barely have beaten its peers on the Dow Jones Industrial Average (DJINDICES:^DJI), but reinvested dividends helped shareholders more than double the Dow's long-term returns.

WMT Chart

WMT data by YCharts.

The company's profit margins may be thin, but they are remarkably consistent and always positive. Many major retailers are losing their grip on long-term profits right now and would sell their souls for a taste of Wal-Mart's stability.

Best Buy (NYSE:BBY) is giving up on the big-box store concept that Wal-Mart perfected and is battling an onslaught of online retailers in the crucial electronics segment. J.C. Penney (NYSE:JCP) saw its mall-cap concept falter and brought in a retail superstar to right the ship, but none of new CEO Ron Johnson's turnaround plans have borne fruit. And through it all, Wal-Mart just keeps ticking along with net margins between 4% and 5%. It's a beautiful thing to watch.

WMT Profit Margin Quarterly Chart

WMT Profit Margin Quarterly data by YCharts.

When your company pulls in some of the world's largest annual revenues, it doesn't take much of a margin to create massive profits and power juicy dividends. And that's exactly what the Waltons are doing.

WMT Dividend Chart

WMT Dividend data by YCharts.

Fool contributor Anders Bylund holds no position in any company mentioned. Check out Anders' bio and holdings or follow him on Twitter and Google+.

The Motley Fool has a disclosure policy. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. Try any of our Foolish newsletter services free for 30 days.