With nothing more than a passing glance, the two companies appear quite similar. Sure, Kroger (KR -0.43%) is a more traditional grocer while Costco Wholesale (COST -0.12%) provides a membership-based, bulk-oriented shopping experience. But food sales are food sales.

To investors, though, these two retailers are considerably different, and even more so than usual right now. One is close to falling off an impressive growth cliff and starting to do things it's said it had no interest in doing. The other hasn't grown quite as quickly of late, but it is just starting to reach its full post-pandemic stride.

But which stock is the better buy right now? Let's see if we can find an answer.

Coming and going

Comparing two similar companies is tricky. Comparing Costco to Kroger is no exception. Investors have come to accept they're paying a premium price for Costco shares because the warehouse model works so reliably well. Kroger, conversely, can't support loftier valuations because its business is a bit more volatile. Each stock mostly reflects each company's relative risk.

Woman shopping in a grocery store.

Image source: Getty Images.

What if, however, the perception of each of these companies was on the verge of such significant change that it could impact their respective stock's price?

This may well be what's coming, and soon. See, Costco is close to running into a headwind that could catch a few too many shareholders off guard, while Kroger is setting the stage for pleasant surprises.

Part of Costco's headwind is the timing of the onset of the COVID-19 pandemic in the United States. It took hold in earnest in March of last year, and the club retailer has boasted year-over-year sales growth in the mid-teen percentages every month since it was able to regroup from the initial coronavirus shutdowns. Making the feat even more impressive is that Costco managed this growth without adding curbside pickup service that rivals like Kroger, Walmart, and Target already offered at the time, but expanded to meet the growing need. As CFO Richard Galanti explained in an earnings call last year: "We still want you to come in. You're going to buy more stuff when you come in, period." That's an argument Galanti doubled down on later in the year. In-store pickup of certain online orders is seen as enough of a compromise to keep customers on board.

As we near the end of a year's worth of pandemic that's been driving huge increases in comparable sales, however, the company is curiously rethinking the value of this amenity. Namely, Costco is trying out curbside pickup at three stores in New Mexico. That's not game-changing, but any program that's going to be taken nationwide would start out as a small trial of this ilk.

There's a subtle message buried in the test run of curbside pickup service. That is, Costco may finally be realizing a whole lot of consumers are in love with the option, and many of them will continue to use it even after the coronavirus threat abates. Numbers gathered by McKinsey late last year indicate 22% of consumers either started to use or increased their usage of curbside pickup shopping once the pandemic took hold, and 47% of those shoppers intend to continue using the option. That's not a massive proportion of consumers, but it's enough to make a dent in Costco's results at a time when comparisons are about to become less impressive.

Kroger, meanwhile, quietly continues to work on a three-year initiative put into place back in 2017 that fell off the radar last year once the pandemic took hold. Called "Restock," the initiative calling for investments in digital technologies, improved customer engagement, and new SKUs (just to name a few) was gaining traction before the pandemic. With the dust finally settling on 2020's challenges, those plans and their impact are back in focus. This is the first year we'll be able to see Restock's benefits not crimped by investments and not artificially buoyed by a global contagion. They should be good; they may be better than most investors anticipate.

Keep it in perspective

Don't read the wrong message. Kroger isn't immune to new problems and Costco isn't doomed. But the contest isn't between the two grocers. The contest is between the two stocks, the prices of which are subject to perceptions as much as they are results.

To this end, Costco shares -- valued at 36 times this year's expected earnings -- are priced richly, particularly given the uncertainty that the company will be able to maintain last year's strong sales growth pace. Any whiff of weakness in this regard could prove problematic for the stock. On the flip side, priced at only 10 times this year's projected profits and 12 times next year's consensus earnings -- earnings that arguably underestimate just how ready the company is for the post-pandemic environment -- Kroger is a lower-risk bargain, and the better buy at the moment. Don't make this a more complicated matter than that.

This article represents the opinion of the writer, who may disagree with the "official" recommendation position of a Motley Fool premium advisory service. We're motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.