Investors have a clear preference for companies that lead their respective industries. Dominance in a market niche confers tangible benefits like stronger sales and earnings trends. Industry leaders tend to have more efficient businesses, too, that can deliver increasing cash returns.

With those factors in mind, let's look at a pair of dominant retail stocks that seem like attractive investments today, but for slightly different reasons.

Both Costco (COST 0.17%) and Tractor Supply (TSCO 0.85%) are gaining market share and winning more customers even as consumer spending slowed in early 2023. Let's examine some reasons why the stocks might be excellent additions into an investor's portfolio.

Costco is on track

Costco shares fell in the wake of news that sales growth slowed to a crawl in March. The warehouse specialist is seeing less demand for consumer discretionary products like jewelry, home furnishings, and electronics even as shoppers continue bulking up on essentials. People shop for these discretionary items more frequently in Costco's e-commerce channel, which reported a painful 12% sales decline in March.

Yet there's no sign of Costco losing its dominant industry hold. In fact, the company just logged a record renewal rate of nearly 93%. And customer traffic rose in the selling period that ended in February, management said in a conference call with investors. These factors are laying the groundwork for Costco's next membership fee hike, which might come in the next year or so.

Sure, Costco doesn't generate huge annual profits. The company's roughly 3% operating margin is right in line with the modest results of peers like Walmart and Kroger. But Costco's earnings are much steadier since they come mainly from subscription fees. That stability makes the stock especially attractive during volatile economic times like these.

Tractor Supply has a good approach

Tractor Supply, the leading rural lifestyle retailer in the U.S., posted impressive operating results this past year. Sales rose 12% to $14.2 billion on top of huge gains in 2021. Sales at existing locations, or comps, jumped 6.3% following a 17% spike in the prior year.

Tractor Supply also protected its leading profit margin even as demand tilted away from more discretionary products. Operating income landed at 10% of sales in each of the past two years and is projected to hold near that double-digit rate in 2023.

Like Costco, Tractor Supply enjoyed rising customer traffic into early 2023 and is winning market share even as industry growth slows. The company's high margins are allowing it to invest aggressively in growth initiatives, too, like its e-commerce expansion and its new store launches. Investors saw concrete benefits from these investments in 2022: Earnings per share rose 13% to $9.71.

With another 70 stores on the way in 2023, and projected comps growth of between 4% and 6%, Tractor Supply has a good shot at crossing $15 billion of annual sales this year. Compared to its pre-pandemic level of just $7 billion, that improvement implies the type of market power that's likely to deliver excellent returns for shareholders over time.