In the discount retail industry, two companies reign supreme: Wal-Mart Stores (NYSE:WMT) and Costco Wholesale Corporation (NASDAQ:COST). Wal-Mart and Costco both drive sales by offering lower prices than competitors, and both carry huge market values. Both stocks also pay dividends to shareholders.

However, that doesn't mean these two are created equal. Upon closer inspection, it appears that Wal-Mart and Costco are best suited for different types of dividend investors.

Better stock for income now: Wal-Mart
Costco stock is enjoying a strong, virtually unstoppable ride higher, while Wal-Mart shares haven't risen over the past year.

WMT 1 Year Price Returns (Daily) Chart

Wal-Mart vs. Costco Stock Performance, data by YCharts

A lot of this performance has to do with Costco's stronger revenue and earnings growth than Wal-Mart in the past year. Over the first three quarters of Costco's fiscal 2015, comparable-store sales, which measures sales at stores open at least one year, rose 7% excluding foreign exchange and gasoline. In comparison, Wal-Mart's equivalent comparable-store sales rose 1% in the first quarter of its 2016 fiscal year in the United States.

Looking back further, Wal-Mart's earnings per share declined from $5.01 to $4.99 between 2013 and 2015. Costco's EPS is up 18% over the first three quarters of fiscal 2015, after a 1% increase in the previous year.

The other factor contributing to Costco's superior stock-price performance is that investors are willing to pay a higher premium for Costco's growth. Costco trades for 28 times trailing EPS, whereas Wal-Mart trades for just 14 times earnings.

While Costco investors surely won't complain about their outsized investment returns, the downside is that Costco's dividend yield is much lower than Wal-Mart's. Wal-Mart's current dividend yield clocks in at 2.7%, which is significantly higher than Costco's 1.1%. Put differently, Wal-Mart offers about 2.5 times as much income as Costco for every dollar invested. As a result, investors who need dividend income now, such as retirees, would probably be better off buying Wal-Mart stock.

Better stock for dividend growth: Costco
On the other hand, Costco makes up for its yield shortfall in the form of rapid dividend growth. Over the past five years, Costco has increased its dividend by 14% compounded annually. Costco also paid $12 per share in cumulative special dividends during this time, for an additional 8% return based on its August 5 closing price.

Meanwhile, Wal-Mart's slowing earnings growth has made it difficult to increase the dividend at a meaningful rate. Wal-Mart's trailing five-year compound annual dividend growth rate clocks in at 10%. That looks great -- but it doesn't truly tell the whole story.

Wal-Mart managed double-digit dividend increases for several years, but more recently, its dividend growth has ground to a halt. Wal-Mart increased its payout by just 2% this year, after a 2% bump the year before.

Therefore, with enough time, Costco's dividend may indeed surpass Wal-Mart's. If Costco continues to increase its dividend at 14% per year and Wal-Mart's dividend grows at 5% per year (which may be a generous assumption, considering its recent history), Costco's dividend payment would exceed Wal-Mart's in about 12 years for any given amount invested today.

From this perspective, younger investors with a longer investing time horizon, who can take advantage of the benefit of compounding growth, may be better off buying Costco stock.

Bob Ciura has no position in any stocks mentioned. The Motley Fool recommends Costco Wholesale. The Motley Fool owns shares of Costco Wholesale. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.