Costco: America's favorite store that everyone forgets about

5 stunning stats about Costco
5 stunning stats about Costco

Amazon and Walmart are leaders in the retail business. But even as the two engage in an epic battle for the hearts, minds and wallets of American consumers and investors, another company in Amazon's backyard is doing just fine too.

Shares of Costco (COST), the warehouse retail giant based in Issaquah, Washington -- a mere 17 mile drive away on I-90 from Amazon's Seattle headquarters -- are up 12% in 2018 and more than 30% over the past year. They aren't far from an all-time high either.

It's sometimes easy to forget how big and successful Costco is since Wall Street is so focused on the binary, Amazon (AMZN) vs. Walmart (WMT) narrative.

But selling ginormous bottles of ketchup, jumbo packages of paper towels and other mega-sized quantities of household essentials is a pretty good business for Costco.

It generated $31.6 billion in revenue in just its latest quarter alone. Same-store sales were up 10.2% from a year ago while online sales surged nearly 37%.

And the momentum is continuing. Costco reported earlier this month that same-store sales were up 11% in May.

Related: Price war intensifies between Costco and Walmart

Costco's sales have grown at a faster clip than its top two rivals too -- Walmart-owned Sam's Club and BJ's Wholesale, (BJ) which went public Thursday for the second time and surged nearly 30%.

Sam's Club is struggling a bit. It closed 63 stores earlier this year. Costco chief financial officer Richard Galanti said during the company's most recent earnings conference call at the end of May that the company did gain some new members as a result.

And according to Thinknum, a company that provides data culled from the web to investment firms, Costco is on top of Sam's Club in social media mentions.

"In the past month, Costco has seen rapid growth in terms of Facebook members talking about the brand while Sam's Club looks to be lagging behind," said Thinknum reporter Joshua Fruhlinger in a blog post earlier this week.

Fruhlinger added that many more Facebook users reported being at Costco than Sam's Club through the social network's "Were Here" feature -- another potential sign that Costco's clout is growing with younger shoppers.

Related: Kroger's online sales up 66%. Amazon and Walmart have a real supermarket competitor

The Costco "Were Here" count has outpaced that of Sam's Club for the better part of a year, with no signs of slowing or reversing, Fruhlinger noted.

Costco's strength has even gotten the attention of legendary investor Warren Buffett. Buffett's Berkshire Hathaway (BRKA) is a big investor in Costco.

Buffett told CNBC last month that he likes Costco because it has a "moat" -- i.e. a very strong competitive position that makes it tough for rivals to gain ground.

The company also has been able to raise the price of its annual membership fees without losing loyal customers.

Costco boosted its fees in the US last year for the first time since 2011, hiking the "executive" plan from $110 annually to $120 and raising the cost of its "goldstar" annual membership from $55 to $60.

Galanti told analysts that Costco's membership renewal rates in the US and Canada last quarter were 90.1% -- right around the same number as a year ago. He added that membership fee income was up nearly 15% in the quarter.

In that respect, Costco is very similar to its Pacific Northwest retail neighbor. Amazon generates big bucks from its Prime membership subscriptions. And Costco is getting shoppers to pay before they even set foot in the store to buy something.

So it's no wonder that Costco is one of the better performing retail stocks out there...just like Amazon.

CNNMoney Sponsors