Source: Bob With via Wikimedia Commons.

After Costco Wholesale (COST 0.17%) reported sales results for the month of May, shares inched up 1% to close at $117.75 on June 5. When you take into consideration the fact that the S&P 500 index rose 0.7% for the day, Mr. Market's reaction to Costco's results seems inconsequential.

Is this a sign that the company's shares are peaking and that a stake in Wal-Mart Stores (WMT 1.32%) or Whole Foods Market (WFM) could be a more sensible play? Or has the market downplayed what could signify a business whose growth prospects have never been better?

Costco's results were impressive
For the month of May, Costco reported revenue of $8.78 billion, up 8% from the $8.13 billion management reported for the same month last year. According to the company's press release, this jump in sales can be attributed, in part, to a 5% increase in store count from 627 locations to 657. Another contributor, however, was the company's 6% improvement in comparable-store sales over this period, driven by a 6% increase in U.S. comparables and a 4% increase internationally.

Source: Costco press release.

This performance brings Costco's revenue for the first three quarters to nearly $82 billion, up 6% from the $77.1 billion management reported for the first three quarters last year. Just as in the case of its monthly performance, Costco can attribute some of its revenue increase to a higher store count but must also chalk some of it up to a 4% increase in comparable-store sales.

Does Costco still have room to run, or are its peers better?
Over the past five years, Costco has been a true growth machine. Between 2009 and 2013, the retailer saw its revenue soar 47%, from $71.4 billion to $105.2 billion. In addition to seeing its store count rise 20% -- from 527 locations to 634 -- over this five-year period, the business has benefited from a 28% aggregate rise in comparable-store sales.

COST Revenue (Annual) Chart

Costco revenue (annual) data by YCharts.

In contrast, rival Wal-Mart's performance hasn't been anywhere near as impressive. Admittedly, the company is significantly larger than Costco, so it's expected to grow at a slower pace; but seeing sales increase 17%, from $408.1 billion to $476.3 billion, might make its shareholders envy Costco's investors. According to Wal-Mart's financial statements, the company only saw its comparable-store sales rise an aggregate 2% over the past five years, but management was able to make up for this by increasing the company's store count by 35%, from 8,099 locations to 10,942.

Undoubtedly, though, the real winner over the past five years has been Whole Foods. While Costco's growth has been impressive, the smaller Whole Foods managed to grow sales by 61%, from $8 billion to $12.9 billion. Over this time frame, the retailer grew its store count by more than 27%, from 284 locations to 362, and it also benefited from a 31% aggregate improvement in comparable-store sales.

On top of posting strong revenue growth in recent years, Costco managed to grow its profits rapidly. Between 2009 and 2013, the retailer saw its net income jump 88%, from $1.1 billion to $2 billion. This rise was due, in part, to its higher revenue, but can also be chalked up to its selling, general, and administrative expenses falling from 10.2% of sales to 9.7%.

COST Net Income (Annual) Chart

Costco net income (annual) data by YCharts,

Over a similar time frame, Wal-Mart saw its net income rise just 11.5%, from $14.4 billion to $16 billion. In spite of seeing a relatively high increase in revenue, the business' bottom line was negatively affected by its cost of goods sold rising from 74.6% of sales to 75.2%. During this same period, Whole Foods saw its net income soar 275%, from $146.8 million to $551 million; higher revenue was met with the business' cost of goods sold falling from 65.7% of sales to 64.2%, and its selling, general, and administrative expenses declining from 30.8% of sales to 29%.

Foolish takeaway
Based on the data provided, it seems pretty clear that Costco is doing well. In addition to growing over the long run, the company has managed to maintain a strong growth trend into this year, and it looks set to continue expanding its footprint. This alone makes the company an interesting prospect for the Foolish investor, especially when placed next to Wal-Mart. But with its superior growth rate, Whole Foods might make for a more interesting retailer to analyze.