Last year was a good one for most of the country's biggest retailers. They benefited from favorable economic trends, but also from the sustained effort of companies like Walmart (WMT 1.32%) and Target (TGT -0.70%) in transforming into multichannel sellers. At a minimum, 2018 demonstrated that these businesses could grow -- and stay profitable -- even as e-commerce stole a bigger slice of the overall retailing pie.

One company stood out from the rest, and it's the one best known for convincing America to pay a yearly fee for the right to buy in bulk and shop directly off shipping pallets. Let's look at how Costco (COST 0.17%) dominated retail in 2018, and what that performance says about its prospects.

Flexing its customer loyalty muscles

Like its peers, Costco enjoyed a healthy growth rebound during the year, with comparable-store sales gains nearly doubling to a 7% pace by early September, from 4% in the prior 12-month period. That marked the chain's best growth performance in four years and included a 9% spike in the core U.S. market. Walmart, by comparison, is expanding sales at close to 2%, and Target's comps have been running at about 5%.

A customer buys several dozen eggs.

Image source: Getty Images.

What's most impressive about this growth gap is that Costco also recently raised its annual membership prices, giving all its members a reason to rethink their subscription. The boost didn't power a shopper exodus, though, and in fact the chain's 5% customer traffic gain last quarter ranks among its highest growth rates in years.

That success dovetails right into Costco's second big win in 2018: earnings growth. Walmart and Target both announced lower operating margins as they directed cash toward supporting the e-commerce sales channel through faster, cheaper delivery and a bigger catalog. They each cut prices in stores, too, in an effort to keep those checkout lanes packed.

Costco's profits mainly come from its membership fees, though, since its product markup is essentially zero. As a result, the warehouse giant saw operating income jump 9% in fiscal 2018 while peers posted declines. The earnings power difference is glaring when you look at the change in annual operating income over the past decade.

COST Operating Income (TTM) Chart

COST Operating Income (TTM) data by YCharts.

Looking ahead

Costco's new fiscal year will include some of the same challenges it has faced recently, especially in defending against online sellers. There are additional risks to its growth options, too, including spiking inflation that will force price hikes on many staple products. The bar keeps rising, too, now that the company's 2019 operating metrics are going up against an usually strong fiscal year that just closed.

So far, Costco appears to be protecting its positive momentum. Comps increased 7% in the U.S. and companywide during the key holiday shopping period, management said in early January.

Investors will have to wait until its next quarterly report in early March to find out how well profits held up during that period. But there's one good reason to expect strong results for the foreseeable future.

Costco's membership renewal rate, the single most important metric for the business, recently inched up to 90.5%, or just below the record high set back in 2015. Even at the increased annual-fee rate, in other words, shoppers are extracting plenty of value from their Costco cards. As long as that's true, the business should expand at a faster rate than the broader industry, just as it has for decades.

Check out the latest Costco earnings call transcript.