Chances are that you've shopped at either a Costco (COST 1.44%) warehouse or a Target (TGT 1.08%) store (or both) at least once. These companies have locations across the country, as they are two of the largest retailers around selling a wide range of merchandise.

Costco has clearly been the better investment to own over the past three-, five-, and 10-year periods, but there also some valid reasons to consider adding Target to your shopping cart as well. 

Of these popular retail businesses, which large-cap stock is the better buy right now? 

The case for Costco 

One of the most attractive qualities about Costco is its membership-based business model. Customers must pay $60 per year (for the basic plan) to be able to shop at one of the company's 852 warehouses. But given that Costco offers some of the lowest prices, the membership more than pays for itself with all the cost savings that can be achieved throughout a 12-month span. For a customer, it's almost a no-brainer. 

Memberships give Costco a high-margin and predictable source of revenue, and they drive tremendous loyalty. The company has proven its ability to successfully raise membership fees every few years. 

With trailing fiscal 2022 merchandise revenue (excluding membership income) of $223 billion, Costco is the world's third-biggest retailer, behind only Walmart and Amazon. And this incredible scale, which is Costco's main competitive advantage, allows the business to negotiate favorable terms with its supplier base. These purchasing savings are passed to consumers in lower prices, a setup that's hard for smaller rivals to compete with.

Even as online shopping has become more popular over the past decade, Costco's business keeps expanding at a rapid pace. With its Prime membership, Amazon is one of Costco's biggest competitors, offering free same-day and two-day delivery on millions of items. Amazon's growth over the past several years has been impressive. 

But in the last five years, Costco has still averaged double-digit revenue growth. It has been holding its own against the constant threat of an e-commerce juggernaut like Amazon. And this should give Costco shareholders confidence about the company's staying power. 

The case for Target 

Target's emphasis on its omnichannel capabilities is noteworthy. In the fiscal 2023 first quarter, 17.5% of sales originated via digital channels, with 97.2% of orders being fulfilled by a store.

Clearly, the company does a good job using its nearly 2,000 stores as local distribution centers, which management says helps to drive efficiencies because it can boost sales volume per store, while at the same time avoiding the need to build too many other distribution centers. 

Shareholders definitely appreciate Target's capital-allocation practices. The retailer has paid a consistent quarterly dividend since 1967, with the current yield being a healthy 3.2%. Moreover, the company is a perennial share repurchaser, having shrunk the outstanding share count by 15% between the start of fiscal 2017 and the end of the latest quarter. There's still $9.7 billion of repurchase capacity on the current plan. 

In the last three years, the stock climbed only 13%, significantly underperforming the broader S&P 500's 42% rise. And over the past 12 months, shares of Target declined about 5% (as of July 3). The stock now has a trailing price-to-earnings (P/E) ratio of 23, a meaningful discount to larger rival Walmart, which has a P/E of 38, as well as Costco's P/E of 40. Furthermore, Target's forward P/E multiple of 16 looks very compelling.  

Investors might also like the fact that no analysts on Wall Street recommending selling the stock. And the average price target is 28% higher than the current share price, indicating notable potential upside. 

An obvious winner on one condition 

In my opinion, Costco appears to be the better business. And its past stock-price performance reflects this reality, so the shares are very expensive today. This means that if investors don't really prioritize valuation in their decision-making process, then Costco is worth owning. But if receiving a steadily rising dividend is more your thing, then Target is the obvious choice.