Target (TGT 0.76%) has been posting some fantastic results lately. Shoppers turned to its multichannel shopping platform in droves during the pandemic, and the retailer used its industry clout to gain market share by meeting demand for everything from essentials to home goods and apparel.

That extra business is also generating a level of profitability that seemed impossible as recently as 2019.

But is the stock a buy today, or is too expensive relative to peers like Walmart (WMT 0.08%) and Costco (COST 1.00%)? And what if Target's recent wins are just temporary side effects of the global pandemic?

Person sitting on couch with an open laptop while holding a credit card in their hand.

Image source: Getty Images.

Expensive for good reason

There's no denying that Target is a pricey stock. It is alone among its cohort of national retailers -- including Costco, Walmart, Kroger (KR -0.58%), and TJX Companies (TJX 0.36%) -- in beating the market since the start of the pandemic. Its 90% run higher in the past year means investors are valuing shares at 1.2 times annual sales, which is near a record premium. You could own Costco, a perennial Wall Street favorite, for less.

TGT PS Ratio Chart

TGT PS Ratio data by YCharts.

But Target shares are expensive for some good reasons. It gained $10 billion in new market share so far during the pandemic thanks to hard-to-replicate advantages like unique merchandise and convenient fulfillment options. The chain started 2021 with a blowout quarter, with sales rising by over 20% compared to Walmart's 6% uptick.

Looking forward

That strong start has management predicting another year of sales growth following 2020's surge. Any major slowdown compared to the pandemic lift might not start showing up until late 2021.

And the news is just as positive on the earnings front. Sure, CEO Brian Cornell and his team plan to pour cash into the business to support the chain's higher sales footprint. The new business they've attracted would normally require building out hundreds of additional stores, after all.

But Target can still reasonably plan for an 8% operating margin this year. That metric had never reached that high before 2020 and was as low as 6% in 2019.

Why buy Target stock

The big question for prospective shareholders is whether Target is a fundamentally stronger business today than it was back then. It's clear that the investments the company made in previous years were the right ones to take advantage of a multichannel retailing world and robust consumer demand. Target still has those assets, but it also has a larger sales footprint and millions of new, highly engaged shoppers.

Combined with its long dividend payout history, those growth wins make the stock a likely winner even after almost doubling since late May 2020. If you prefer a retailer that likely won't take a big earnings hit during recessions, then you should consider Costco shares.

Yet Target today offers a good mix of financial and operating strength, plus the potential for more sales and profit margin gains ahead. Yes, it's possible that the stock will pull back if indexes fall back below their all-time highs. But Target has earned its share-price premium, and so there's no need to wait for a correction if you're interested in the stock.