Costco Wholesale (COST 0.17%) was one of the retail industry's big winners last year. Consumers spent more than ever at the company's warehouses during the COVID-19 pandemic, stocking up on food and other essentials as well as stay-at-home items like electronics, appliances, home furnishings, and sporting goods.

The pandemic is finally easing -- at least in the U.S. -- but if anything, that seems to be driving further sales and earnings growth for Costco. On Thursday afternoon, the wholesale club giant reported impressive results for the third quarter of its 2021 fiscal year. Let's take a look.

Sales momentum continues

Costco reports its sales on a monthly basis. Thus, investors knew even before the earnings release that the retailer would post strong top-line results. Indeed, adjusted comparable sales rose 11.1% in March and surged 24.2% in April.

For the full quarter, consisting of the 12-week period ending on May 9, adjusted comparable sales jumped 15.1%. Including the tailwinds from higher gasoline prices and a weaker dollar, comp sales rose 20.6%. Total sales grew an impressive 21.7%, reaching $44.4 billion. Finally, membership fee income increased 10.6% to $901 million.

The entrance to a Costco warehouse.

Image source: Costco Wholesale.

A big earnings recovery

In Costco's second fiscal quarter, earnings per share rose just 2% year over year, despite strong sales growth. EPS missed the analyst consensus by about 13%. Costco attributed its margin deterioration to pandemic-related costs -- particularly a $2 per hour wage premium -- as well as lower margins on gasoline sales.

Costco's gasoline profits continued to shrink in the third quarter, as it was lapping a period of unusually high margins in that business last spring. However, this time, it was able to offset that pressure, thanks to the strong profitability of its core business and the end of its COVID-19 premium pay early in the quarter.

Gross margin increased to 11.53% from 11.18% in the third quarter of fiscal 2020. Meanwhile, operating expenses as a percentage of sales fell to 9.44% from 10.51% a year earlier. The end of the premium pay program drove about half of that improvement. Costco's stellar sales growth also helped it gain cost efficiencies, more than making up for a permanent $1/hour wage increase implemented in March.

The net result was that EPS surged 46% year over year, from $1.89 to $2.75. This beat the average analyst estimate of $2.34 by a wide margin.

It's not too late to invest in this growth stock

Costco certainly isn't as flashy as most growth stocks. Still, the wholesale club operator's revenue has surged by more than 50% over the past five years. EPS has grown even faster, driving a 154% gain for Costco stock.

COST Revenue (TTM) Chart

Costco Wholesale revenue, earnings, and share price, data by YCharts.

While annual revenue is now approaching $200 billion, Costco has plenty of room left to keep growing. In its existing markets, Costco will likely continue to gain market share over time, as its unmatched buying power allows it to consistently undercut competitors on price. Last year's acquisition of Innovel Solutions -- now known as Costco Logistics -- is also enabling rapid growth in sales of bulky items (like appliances and furniture).

Additionally, the retail giant has a massive opportunity to add more warehouses over time, especially abroad. Today, more than 700 of its 809 warehouses are in North America. International expansion could allow Costco to continue growing at a steady pace for decades.

Costco stock may look pricey at nearly 40 times trailing earnings. But considering the company's big moat, consistent growth, and massive long-term expansion opportunities, Costco stock still has huge upside potential for long-term investors.