Costco (COST -0.06%) has been one of the market's most resilient retail stocks since its public debut in 1985. The warehouse retailer endured four major U.S. recessions while turning a $1,000 investment in its IPO into more than $436,600.

That was an incredible run, but cautious investors might be hesitant to buy Costco today because it looks a bit pricey at 46 times forward earnings. So today, I'll discuss four reasons it deserves that premium valuation -- and why it could head higher.

A shopper pushes a grocery cart in the aisle of a supermarket.

Image source: Getty Images.

1. Membership growth and high renewal rates

Costco can sell its products at such low prices and margins because it generates most of its profit from its high-margin membership fees. To keep growing, it needs to keep gaining new members while maintaining high renewal rates.

In the second quarter of fiscal 2024 (which ended in February), Costco's total number of cardholders rose 7.3% year over year to about 132 million. Its worldwide renewal rate stayed flat year over year at 90.5%, but its renewal rate in the U.S. and Canada -- which accounts for 81% of its stores -- reached 92.9%.

2. Expanding brick-and-mortar presence

Costco's low prices, sales of bulk products, and sticky membership plans enable it to compete effectively against e-commerce giants like Amazon and superstores like Walmart . That's how Costco survived the "retail apocalypse" which wiped out many of its brick-and-mortar peers.

Instead of closing its brick-and-mortar stores, Costco expanded its presence from 638 warehouses at the end of fiscal 2013 (which ended in September. 2013) to 875 warehouses at the end of the first quarter of fiscal 2024. It also expanded overseas by opening more warehouses in Asia and Europe. That growing store count should lock more customers into its membership plans and widen its moat against Walmart's Sam's Club, BJ's Wholesale, and other warehouse retailers. Costco plans to open 30 new locations (including two relocations) for all of fiscal 2024.

3. Consistent comps growth

Costco experienced a major growth spurt throughout fiscal 2020 and fiscal 2021 as the pandemic drove more shoppers to stock up on groceries and consumer staples. But its adjusted comps growth (which excludes fuel sales and foreign exchange) decelerated over the following two years as the pandemic eased and inflationary headwinds curbed consumer spending.

Adjusted Comps Growth (YOY)

FY 2020

FY 2021

FY 2022

FY 2023

1H FY 2024

U.S.

9.2%

13.6%

10.7%

4.2%

3.7%

Canada

7.4%

12.1%

11.2%

8.1%

8.6%

Other International

11.2%

13.4%

9.6%

7.6%

7.7%

E-Commerce

50.1%

42.6%

11.3%

(4.8%)

12%

Total Company

9.2%

13.4%

10.6%

5.2%

4.8%

Data source: Costco. YOY = Year-over-year.

However, its comps growth stabilized in the first half of fiscal 2024 with accelerating growth in Canada, its other international and e-commerce segments. The company's U.S. business should also gradually warm up again as the macro environment improves.

Analysts expect Costco's revenue to rise 5% in fiscal 2024 and 7% in fiscal 2025 -- so it's still growing faster than Walmart, Target, and many other big box retailers.

4. Stabilizing margins

In fiscal 2023, Costco's gross margin declined as it sold a higher mix of lower-margin food products in an inflationary environment and its e-commerce business cooled after several years of double digit growth. But in the first half of fiscal 2024, its gross margin expanded again as its e-commerce business recovered.

Costco hasn't raised its membership fees since 2017, but it's widely expected to hike those fees in the near future. Raising those fees should further boost its gross margins and alleviate some of the inflationary pressure on its retail margins.

Costco's operating margin also dipped from 3.4% in fiscal 2022 to 3.3% in fiscal 2023 as its revenue growth slowed and its gross margins declined. But in the first half of fiscal 2024, that figure rose 20 basis points year over year to 3.5% as its comps growth and gross margins stabilized. It achieved that expansion even as it raised its starting wages in the U.S. and Canada in the first quarter of the year. As a result, analysts expect its earnings per share (EPS) to grow 14% in fiscal 2024 and 8% in fiscal 2025.

Costco remains a great evergreen stock

Costco's stock might initially look expensive, but its consistent comps growth, resilient business model, and expansion plans should drive its profits higher over the long term. As long as the company doesn't deviate from its current course, shares could continue to rally higher and outperform many of its brick-and-mortar peers for the foreseeable future.