Costco Wholesale (COST -0.89%) stock is rarely cheap, either objectively or compared with its competitors. But there are several reasons why the membership-based retailer makes for an excellent stock to own anyway -- and why it merits its premium valuation. Right now, for example, the shares trade at a price-to-earnings ratio of 38.5, just slightly above its 5-year average of 37.

Yet, that's actually less expensive than you might realize -- and it could be worthwhile to buy Costco stock at this price. I'll explain why.

Why Costco stock is usually expensive

Costco has historically been a great stock to own, easily beating the broader market. It has a differentiated model that generates high sales (usually increasing at a steady pace) as well as growing profits. 

Since the pandemic started, performance has shifted, first to extreme sales growth, and now to almost halted sales growth. But the underlying health of the business is indicated by more defined metrics -- specifically, those related to membership.

Since Costco's moat revolves around its low prices, membership is critical to the business -- whether at $60 annually or $120 for an executive membership. And that becomes even more attractive when shoppers are being careful about spending. When consumers are under pressure -- as they have been recently -- Costco's volume typically increases, and that resilience is the beauty of its business model.

In the 2023 fiscal third quarter (ended May 7), total sales increased 1.9%, and comparable store sales (comps) were about flat. But membership increased 7% more than last year, with membership fee income up from $984 million to more than $1 billion. Renewal rates continue to come in at record numbers: 92.6% for the U.S. and Canada and 90.5% worldwide.

Why it's cheaper than you think right now

It's important to asses how expensive a stock is in terms of its valuation, but it's also important to understand what the valuation means in the context of each stock. Valuation is an evaluation tool, but it's not objective across companies and industries. Growth stocks tend to have higher valuations, for example, because they're expected to have fast-growing stock prices. Other stocks might have high valuations because they're reliable for gains, like Costco, or because they post incredibly high profits consistently, like Visa.

But there's something else pushing up Costco's price-to-earnings (P/E) ratio right now. Costco's earnings per share (EPS) increases on an incredibly consistent basis, but it actually declined in the third quarter year over year. That was due to company action. CFO Richard Galanti explained that last year Costco built out its own supply chain to circumvent global supply chain logjams and get merchandise to its customers.

Now that the global supply chain is fluid again, going back to its standard suppliers has become cheaper than maintaining its own fleet of ships. So the company has taken a one-time charge to back out its supply chain, and that impacted earnings in the third quarter. 

A lower EPS increases the P/E ratio. That's why the valuation is higher today. Other valuation metrics show Costco's current stock price to be valued just about at its 5-year average. 

COST PE Ratio (Forward 1y) Chart

COST PE Ratio (Forward 1y) data by YCharts

The forward P/E ratio is slightly lower than average since it accounts for returning to the typical EPS increases that Costco usually demonstrates. In other words, the standard P/E ratio isn't the best valuation metric to value Costco stock at right now. Using almost any other standard valuation metric, Costco is priced reasonably compared to its average price.

Costco stock is a great long-term holding

Since you can't time the market, putting too much emphasis on valuation would be a mistake if you're thinking about a stock with exceptional long-term potential. Costco stock has beaten the market over time, and it has the ability to continue offering gains for shareholders for many years to come. At this price, investors should definitely consider buying Costco stock.