Retail giants Costco Wholesale (COST 0.75%) and Target (TGT 1.55%) have a lot in common,  but they could hardly be more different from an investor's point of view. Both companies are navigating the COVID-19 era with confidence. But which of these stocks is the better buy right now?

Let's take a look.

A young couple rushes through busy streets, smiling and carrying several shopping bags.

Image source: Getty Images.

The case for Costco

The warehouse membership retailer is on a roll. Costco's comparable sales rose 13% in August, or 15% if you exclude the impact of lower gasoline prices. Total sales increased 9% year over year to $163 billion in fiscal year 2020, which ended on Aug. 30.

Many retailers would call this a game-changing boost that will go down in the company's history as a unique windfall. Not Costco, though. In this case, the 2020 revenue growth simply got back to the year-over-year growth rates of 2018. You don't have to go too far into Costco's history to find even juicier revenue jumps:

COST Revenue (Annual YoY Growth) Chart

COST Revenue (Annual YoY Growth) data by YCharts. YoY = Year over year

And here's the best part of Costco's business plan: The revenue growth doesn't really matter.

You heard me. Costco's operations are not set up to reap massive profits out of rising top-line revenues. The company's operating margins are razor-thin because of low prices to the consumer, alongside generous salaries and benefits to Costco's 254,000 employees.

"Our average gross margin is in the very, very low double digits, 11% or 12%, implying a 13% or so markup," Chief Financial Officer Richard Galanti explained in May's third-quarter earnings call. "Traditional retail grocers are in the mid- to high-20s and other big boxes are above that and regular retail is way above that."

Costco still racked up $3.7 billion in earnings as reported under generally accepted accounting principles (GAAP) and $3.4 billion of free cash flows in fiscal year 2019. The secret sauce in Costco's recipe is its membership program. A total of 54 million paid members added $3.4 billion to Costco's top line last year, and that revenue source is pretty much pure profit.

In other words, nearly all of Costco's bottom-line profits come from the membership fees. The warehouse retail operations can be seen as a marketing tool that keeps those sweet membership fees coming.

And it's the perfect retail model for these troubled times. I expect Costco to report a significant rise in membership numbers when the company publishes its full-year results near the end of September. That's when the magic happens.

The case for Target

This one's a more traditional take on retail operations. Target doesn't require shoppers to pay an annual fee, and the company's profits simply grow larger along with its revenues. Costco's gross margins averaged out to 13% over the last four quarters, while Target's stopped at 29%.

There's certainly nothing wrong with that basic business model, especially when bulk shoppers are flooding your stores during a pandemic and the resulting revenue trend looks like this:

TGT Revenue (TTM) Chart

TGT Revenue (TTM) data by YCharts. TTM = Trailing 12 months 

Target is a winner in 2020, combining a broad assortment of merchandise with reasonable prices and an effective e-commerce component.

The winner: Costco

There are no losers in this matchup, but I would much rather own Costco for the long haul.

The membership policy makes Costco's profits much more predictable than Target's, and I wouldn't be surprised if the coronavirus windfall turns out to be stickier for the warehouse club than the big-box traditionalist. I'll admit that Costco's stock also trades at a substantial premium here, fetching 36 times forward earnings versus Target's 19 times forward estimates. Like Warren Buffett, I'd much rather buy a great business at a reasonable price than a decent business at a great price.

I'm not telling you to sell Target, or even to stay away from buying it. You should just put more of your money into Costco's stock if you're buying both of them.