Few companies have as many devotees as Costco Wholesale (COST -0.38%). If you've been following shares of the giant retailer, you've also seen its strong results, beating the market by 23 percentage points over the past three years, 105 percentage points over the past five, and 250 percentage points over the past decade. That kind of outperformance is rare but can have an unbelievable effect on a retirement portfolio.

After seeing those numbers, many folks might be interested in investing in Costco. However, the company recently delivered disappointing news that must be considered before taking a position. So let's dive in and see whether Costco is a buy or if you should pass on the stock.

Second-quarter sales just missed the mark

On March 2, Costco reported $55.3 billion in second-quarter sales, $300 million less than analysts had expected. I know what you're thinking: "Three hundred million dollars is barely anything compared to $55.3 billion!" While that may be true, Costco's shares are priced for perfection.

COST PE Ratio (Forward) Chart

COST PE Ratio (Forward) data by YCharts

With the stock trading for 33 times forward earnings, it's valued about 50% higher than other retailers like Walmart and Target. When a stock is valued that much more than its peers, it must consistently beat expectations or risk being sold off. That's precisely what happened the day after the earnings report; the stock dropped about 2% although it was down over 4% during some parts of the trading session.

While that miss got all the headlines, was it that bad of a report? Let's see. For the second quarter (ended Feb. 12), sales rose 6.8% company-wide but only increased 3.5% for February, indicating sales are starting to slow for Costco.

The company is seeing strength in its food division, but "big-ticket discretionary items" aren't selling like they used to in prior periods. Management indicated a lot of this spending got pulled forward thanks to COVID-19, but the current economic environment also has a prominent role to play. Without those big-ticket sales, it's harder for Costco to grow steadily.

But its earnings continue to trend in the right direction, climbing 13% from $2.93 per share a year ago to $3.30 in Q2.

A membership fee increase could be coming

While this quarter didn't knock the ball out of the park, one catalyst could help Costco tremendously.

It will be six years this June since Costco last raised its membership fee, and an increase could be on its way. CFO Richard Galanti said, "It's a question of when, not if" when referring to hiking the fee on the company's quarterly conference call. On average, Costco has raised its membership fee every five years and seven months, indicating a boost could be right around the corner.

While a membership fee increase won't move the needle on Costco's revenue (membership fees accounted for 1.9% of total Q2 revenue), it will go directly to the bottom line and boost its profitability.

This could be a major catalyst for the stock, sending it higher. Or it may do nothing to the shares and decrease its valuation to be more in line with its peers. Regardless, Costco remains a solid company, even when consumers aren't willing to spend as much. For this execution, you have to pay a high multiple for the stock.

If Costco continues to post disappointing revenue numbers, the stock will likely keep slumping given it's still priced for perfection. I doubt consumers' strength will return this quarter (or the next), so it may be best to wait for Costco to reach a more attractive valuation level before purchasing the stock.