Costco's (NASDAQ:COST) warehouse club model, which lets members buy bulk products at steep discounts, has become a major threat to traditional supermarkets like Kroger (NYSE:KR) in recent years. Costco's own Kirkland Signature brand also competes against Kroger's private-label offerings and other packaged food brands.

Investors clearly preferred Costco to Kroger over the past five years, as Costco's stock more than doubled and Kroger's dipped 10%. But will Costco remain a stronger investment over the next five years?

A woman shops for groceries while checking her phone.

Image source: Getty Images.

The differences between Costco and Kroger

Costco operates 787 warehouses worldwide, including 547 locations in the U.S. and Puerto Rico, 100 locations in Canada, and the rest in overseas markets. Costco generates most of its revenue from product sales, but most of its profits come from its annual membership fees.

Kroger operates 2,757 stores under its namesake brand and subsidiaries, which include Harris Teeter and Food 4 Less, across the U.S. Of those locations, 2,270 have pharmacies, which offer discounts to paid members through its Rx Savings club. Unlike Costco, Kroger generates most of its revenue from product sales.

Which company is growing faster?

Costco's adjusted comparable store sales (which exclude currency impacts and fuel costs) grew 6.1% in fiscal 2019, which ended last September. Its adjusted comps rose another 6.9% in the first three quarters of 2020, sparked by a pandemic-driven spike in sales in the first half of the year.

A woman checks out of a grocery store.

Image source: Getty Images.

Costco's e-commerce sales rose 23.3% in 2019, but accelerated to 32.3% growth in 2020 as its members placed more online orders throughout the crisis. Costco's profitability remains stable, with 17% earnings growth in fiscal 2019 (aided by a few one-time benefits) and 2% annual earnings growth in the first nine months of 2020. Higher wages and sanitation expenses related to COVID-19 squeezed its margins this year.

Costco didn't offer any clear guidance last quarter, but analysts expect its revenue and earnings to rise 7% and 3%, respectively, for the full year.

Kroger's identical store sales (excluding fuel) grew 2% in fiscal 2019, which ended on Feb. 1, as its adjusted earnings per share grew nearly 4%. Its digital sales rose 29%, driven by its delivery and pickup options, which now reach 97% of all Kroger households. However, Kroger's expansion of its pharmacy business is weighing down its gross margins, and its digital and private-label investments are throttling its operating margins.

Kroger expects its identical store sales to rise at least 2.25% for the full year, and for its adjusted EPS -- buoyed by up to $1 billion in buybacks -- to grow 5%-10%.

The valuations and dividends

Costco trades at 32 times forward earnings, while Kroger has a much lower forward P/E of 13. Investors clearly have more faith in Costco's sticky memberships and private-label products than Kroger's traditional supermarkets, but the stock is getting pricey relative to its growth.

Unlike many other retailers, Costco and Kroger continue to pay steady dividends. Costco raised its dividend for the 16th straight year in April, and Kroger will likely raise its payout for the 14th straight year in 2020.

However, Costco's forward yield of 0.9% is paltry compared to Kroger's 3% yield. Kroger's low valuation and high yield could set a floor under the stock, but Costco doesn't have the same safety net.

The winner: Kroger

Kroger still faces long-term challenges from Costco, Walmart, Target, and Amazon, but it can leverage its scale to widen its moat while improving its digital platform, its private-label businesses, and its analytics capabilities to fulfill the three-year "Kroger Restock" plan that kicked off in 2018.

Costco is still a long-term winner, but its stock looks too pricey relative to its growth. Its valuation might be justified by the strength of its business throughout the crisis, but its upside potential is limited at these levels.