When Costco Wholesale (NASDAQ:COST) reported fiscal second-quarter results in early March, investors didn't react positively. They sent the stock price down by more than 2% over the next few days.

Fortunately, the stock has recovered and trades at an even higher level than before it reported earnings. What are people talking about that set the stock price on a roller coaster ride?

Consistently better results

There's nothing to complain about regarding Costco's sales growth. It has consistently produced higher annual same-store sales (comps) over the years. In the most recent quarter, which ended on Feb. 14, adjusted comps, which remove foreign currency translation adjustments and gasoline price changes, rose by 12.9%.

A woman holing a crate in a warehouse.

Image source: Getty Images.

What gave people pause, however, were the earnings. Costco's diluted earnings per share were $2.14 compared to $2.10 in the year-ago period. This was also well below the $2.45 consensus analyst estimate.

However, higher pandemic-related costs, including increased wages, dented this period's earnings by $0.41 a share. Elevated gasoline costs also hurt results since Costco is slow to raise prices to its customers.

While gasoline prices are volatile, Costco will benefit on the cost front going forward.

A good long-term story

For starters, Costco is discounting the wage premium that it paid workers during the pandemic. While it is permanently raising wages, this will still result in hundreds of millions of annual savings compared to last year.

Looking further out, management has done an excellent job of increasing sales and profitability over the long haul. Over the last five years, earnings went from $5.33 to $9.02 a share, more than an 11% average annual growth rate.

It has done this not by trying to maximize near-term profits but by engendering loyalty with low prices on a broad range of high-quality goods and services. Costco's membership renewal rates are typically around 90%, reaching 91% in the U.S. and Canada last year. It also consistently adds new members, which have grown from 47.6 million to 58.1 million over the last five years.

Reliable dividends with periodic surprises

Costco passes some of its earnings on to shareholders, having consistently raised dividends every year since 2004. The dividend yield is 0.8%, although you can certainly find higher-yielding stocks.

However, the board of directors has periodically also paid large special dividends. The last one was a $10-per-share payment in December. Before that, it paid out $7 per share in 2017. While you can't count on them, they demonstrate Costco's willingness to reward shareholders.

While people were talking about Costco in a negative light following its earnings release, they quickly changed their tune. Going forward, the chatter will undoubtedly center around its customer-focused approach that produces consistently improving results and an outsize shareholder return.

In a tough retail environment, Costco will continue to prove it is an elite company and a core holding for your portfolio. Once you own the shares, you can chat about how much money you've made from your investment over the years.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.