Costco Wholesale (COST -1.72%) shares didn't close above $1,000 by late 2024, but they flirted with that impressive figure. The stock rose 50% through mid-December, doubling the rally in the S&P 500.

The $1,000 per-share milestone seems achievable, perhaps by early 2025. That's because the warehouse retailer thrilled Wall Street this past year by proving it can attract more customers both to its stores and its online business, even as membership prices rose, and consumers grew more cautious in their spending patterns.

But does that good news make Costco a clear choice for most investors' portfolios in 2025 and beyond? Let's take a closer look.

Buy it for growth

The surest path to higher returns for Costco shareholders in 2025 is if the company can continue to win market share. It is entering the year with solid momentum on this score. Comparable-store sales were up 7% in the fiscal first-quarter period that ran through late November, the company revealed on Dec. 12. Growth was roughly double that rate for its e-commerce segment.

Those results beat rivals like Target and Walmart although competition is intensifying between Costco and Walmart in recent quarters. Walmart's booming e-commerce business is attracting more higher-income shoppers into its ecosystem, threatening Costco's dominant hold on that key demographic.

Still, Costco has a strong track record of outgrowing competitors through a wide range of economic growth conditions, ranging from recessions to booming consumer spending. It's likely investors will see another year of at least modest market-share gains in 2025.

Hold it for profits and cash

Costco is less impressive as an investment when it comes to the chain's profitability and its dividend-return policies. Its low prices keep it well below peers when it comes to the gross profit margin, which hovers at around 13% of sales. Walmart achieves double that figure, and even Target, which has been struggling in 2024, has boosted profitability toward 30% of sales.

WMT Gross Profit Margin Chart

WMT Gross Profit Margin data by YCharts.

Investors shouldn't expect Costco to close that gap any time soon, either, as management has made it clear that it intends to invest excess cash mainly into keeping prices low. The chain's dividend policy also implies meager quarterly cash returns that are far below peers. Sure, Costco has a habit of issuing large, "special dividends" every few years. But investors looking for a generous and predictably growing income stream might prefer Walmart stock over Costco right now.

Don't sell Costco stock

The biggest temptation to sell Costco heading into 2025 is the chain's elevated valuation following two consecutive years of over 30% gains in the S&P 500. Shares are priced at an all-time high of 1.7 times sales and 58 times earnings, meaning there's lots of room for contraction if the market turns lower or if Costco stumbles in its operating results next year.

If the stock's rally has boosted it to an outsized portion of your portfolio, then it might make sense to sell a few shares so that you aren't overexposed to one single investment.

That said, Costco has earned its premium over peers by putting together a long streak of market-share wins and constructing a retailing-as-a-service business that generates highly stable membership fees. That selling approach makes its earnings production less variable than comparable retailers, and it's a key reason why the stock has performed so well through the pandemic and its immediate aftermath.

Thus, it's likely that investors will be happier to have this expensive stock in their portfolio in 2025 and beyond.