Costco (COST 0.23%) and Unilever (UL 0.67%) were both well-insulated from the COVID-19 pandemic this year. Shoppers stocked up on more essentials at big retailers like Costco, and that trend boosted demand for Unilever's consumer brands.

Costco's stock has risen about 25% this year, driven by its accelerating sales growth, as Unilever's stock has risen just 3%. But will Costco continue to outperform Unilever next year after the pandemic ends?

Costco continues to fire on all cylinders

Costco ended the first quarter with 803 warehouses worldwide, up from 785 warehouses a year earlier. It's one of the few retailers that has continued to open new stores throughout the pandemic.

A woman in a mask shops for essentials as she checks her phone.

Image source: Getty Images.

Over two-thirds of Costco's warehouses are located in the U.S., which is still struggling to contain the pandemic. That ongoing crisis boosted Costco's domestic comparable-store sales throughout the year while lighting a fire under its e-commerce business.

In fiscal 2020, which ended on Aug. 30, Costco's adjusted comps grew 9.2% -- rising 9.2% in the U.S., 7.4% in Canada, and 11.2% in its other international markets. Its e-commerce comps surged 50.1%.

In the first quarter of 2021, its adjusted comps grew another 17.1%, jumping 17% in the U.S., 16.8% in Canada, and 17.7% in its other international markets. Its e-commerce comps soared 86.2%.

Costco's renewal rate in the U.S. and Canada dipped 10 basis points sequentially to 90.9% during the quarter, but that was mainly due to deferred renewals in Canada during the pandemic. Its international renewal rate remained unchanged at 88.4%. Maintaining high renewal rates is essential for Costco, which generates nearly all of its profits from its annual membership fees rather than product sales.

Costco didn't offer any guidance for the full year, but analysts expect its revenue and earnings to rise 10% and 15%, respectively. Next year, they expect its revenue and earnings to rise 6% and 9%, respectively, as its growth cools off after the pandemic.

Unilever generates stable but underwhelming growth

Unilever, which is based in London, sells over 400 consumer brands worldwide. A dozen of those brands -- including Lipton, Knorr, Dove, Rexona, Hellmann's, and Omo -- each generate over a billion euros ($1.2 billion) in sales each year.

A shopping cart in a grocery aisle.

Image source: Getty Images.

Like many other consumer staples companies, Unilever faces three main headwinds: competition from private-label brands, shifting consumer tastes (especially in packaged foods), and an over-diversified portfolio in which its weaker brands sometimes overwhelm its stronger ones.

In 2019, Unilever's underlying sales (which exclude acquisitions and divestments) rose 2.9%, as sales of its beauty & personal care, home care, and foods and refreshment products rose.

In the first nine months of 2020, Unilever's underlying sales grew 1.4%, with positive growth across all three categories. That growth was largely driven by North America's demand for packaged foods and home hygiene products throughout the crisis, which partly offset its growth and pricing challenges in Europe and soft sales in Southeast Asia and Latin America.

Unilever's growth seems stable, but it's underperforming many of its industry peers. For example, Procter & Gamble (PG 0.64%) grew its organic sales by 6% in fiscal 2020, which ended on June 30, and another 9% in the first quarter of 2021. That gap suggests that P&G's brands -- many of which directly compete against Unilever's -- are locking in more shoppers.

Analysts expect Unilever's reported revenue and earnings to both rise about 7% this year, but its underlying growth could remain weaker after excluding a few recent acquisitions. Next year, analysts expect its revenue to grow less than 1%, and for its earnings to rise just 3%.

The dividends and valuations

Costco pays a forward yield of 0.8%, and its stock trades at 37 times forward earnings. Unilever pays a much higher forward yield of 3.3%, and its stock trades at about 20 times forward earnings.

Investors might initially be attracted to Unilever's higher yield and lower valuation, but it's cheaper than Costco because it generates weaker growth with a narrower moat. Costco's sticky memberships and its growing brick-and-mortar presence keep it ahead of rivals like Walmart's Sam's Club, but Unilever lacks any distinct advantages against bigger rivals like P&G.

Costco's stock looks a bit pricey, but it's still a more compelling investment than Unilever, which could underperform many of its consumer staple peers for the foreseeable future.