Costco (COST -0.24%) was down by 1.2% on Wednesday as the company delivered lower than expected sales and earnings figures for the last quarter. However, the company is still enjoying strong customer loyalty and outperforming peers like Wal-Mart (WMT 0.46%) and Target (TGT 1.03%) by a considerable margin. If the stock continues pulling back in the coming weeks, it may even become a buying opportunity for investors.

Numbers and perspective
The company delivered a sales increase of 5% for the first quarter of fiscal 2014, and total comparable sales increased by 3% with comparable sales growing by 3% in the U.S. and 1% in international markets. Excluding the impact of gasoline prices and foreign exchange fluctuations, things looked much better, especially in international markets; adjusted comparable sales grew by 5% in the U.S., 6% in international markets, and 5% on a total company level.

Gross margin was up by seven basis points to 10.8% during the quarter. On the other hand, selling, general and administrative expenses increased by 17 basis points to 10.2% of revenue versus 10.05% of sales in the same quarter of the previous year. Operating income increased to $668 million versus $639 million in the year-ago quarter.

All in all, net income was $425 million during the quarter, or $0.96 per diluted share, compared to $0.95 per diluted share in the same quarter of the previous year. This was nearly 6% lower than the $1.02 per share expected on average by Wall Street analysts.

Even if rising SG&A expenses are a variable to watch in the coming quarters, a big part of the recent disappointment seems to be due to factors outside the company´s control like falling gas prices and unfavorable exchange rate fluctuations.

Customers are still loyal to Costco, considering that renewal rates were at a strong 87% on a worldwide basis. Membership fee income was $549 million, or 2.24% of sales during the quarter; that's 7.3% higher than the same quarter in the previous year and 4 basis points higher as a percentage of sales.

This is not only very important in terms of commercial performance and competitive strength, but membership fees also represent a big part of the company´s profits, as Costco operates with razor thin profit margins on product sales while making most of its earnings from memberships.

Versus the competition
Costco has outgrown competitors like Wal-Mart and Target by a considerable margin over the last years. Especially in a mature and competitive industry like discount retail, where one company´s gains are in many cases the other one´s loses, beating the competition can be of utmost importance.

Fortunately for investors in Costco, the company continues doing better than its rivals. Wal-Mart reported a 1.63% increase in revenues for the quarter ended on Oct. 31 with sales at Wal-Mart U.S. increasing by 2.4%, revenue in Wal-Mart international growing by 0.2%, and Sam's Club revenue growing by 1.1% in the last quarter. Sam´s Club comparable sales excluding fuel were up by 1.1% during the quarter.

Target is doing better than Wal-Mart, but still underperforming Costco as of the last quarter. Total sales grew by 4% during the quarter, but Canada produced a big proportion of that growth. Revenues in the U.S increased by a moderate 2% to $16.9 billion on the back of a 0.9% increase in comparable store sales during the period.

Moving forward
Costco continues expanding its store base, and international markets still offer abundant room for growth. The company is planning to open a total of 30 new units in fiscal 2014, 15 of which already opened during the first two quarters--this would mean a nearly 5% increase in square footage for the fiscal 2014 versus fiscal 2013.

Costco is giving more relevance to international locations lately: 16 of the company´s new stores in fiscal 2014 will be in the U.S, four in Australia, three in Canada, two in Korea, two in Japan, two in Spain and one in Mexico. Considering that the company is still taking its first steps when it comes to global expansion, international locations could be a big growth driver for Costco in the coming years.

The company has now broadened its online presence to four countries: U.S., Canada, U.K. and Mexico. E-commerce sales were up by  a remarkable 24% during the quarter, and they still represent a relatively small 2.5% of total revenues. It´s hard to tell at this stage how big Costco can become online, but investors should welcome the fact that the company is expanding into new areas and adapting to the online revolution.

Bottom line
SG&A expenses need to be monitored in the middle term, if only to make sure that the company is keeping its costs at bay. But temporary and uncontrollable factors like falling gasoline prices and exchange rate fluctuations have a considerable responsibility for the recent earnings miss. Then again, Costco continues enjoying strong customer loyalty and doing much better than the competition, and the company has plenty of room for growth in the long term.

The recent earnings miss is no reason to sell Costco, and if the stock declines considerably it may even provide a compelling buying opportunity.