Source: Wikimedia Commons

When Costco Wholesale (COST -0.24%) reports its financial results for the second quarter of its 2014 fiscal year on March 6, shareholders will know how well the business is standing up to competitors Wal-Mart Stores (WMT 0.46%), Target (TGT 1.03%), and Whole Foods Market (WFM). Heading into this event, should the Foolish investor consider stocking up on the retail giant, or is the investment too risky?

Mr. Market has mixed expectations!
For the quarter, analysts expect Costco to report revenue of $26.7 billion. If forecasts turn out to be accurate, it will mean that Costco has grown its top line by 7% compared to the $24.9 billion it reported in the same quarter a year earlier. More likely than not, any increase in sales will be the result of higher comparable- store sales combined (at least partially) with an increase in store count.

Whereas Costco's revenue is expected to rise, its profitability is forecast to shrink. For the quarter, analysts expect management to report that earnings per share fell nearly 6% from $1.24 to $1.17. Seeing as how the company's share count has hovered around 436 million shares for the past few years, a larger contributor to lower profits will likely be a rise in costs in relation to sales.

But how does Costco stack up against its peers?
While it's interesting to see how a company performs in any given quarter, a better indicator of its intrinsic value is how it performs over an extended period of time. Over the past five years, for instance, Costco has done very well for itself. During this time frame, the business saw its revenue rise 47% from $71.4 billion to $105.2 billion. The company's profitability did even better, with net income rising an impressive 88% from $1.1 billion to $2 billion.

Source: MSN Money

This makes Wal-Mart's and Target's growth seem trivial at best. Over the past five years, Target grew its top line by 11% from $65.4 billion to $72.6 billion. Looking at profitability, the situation for the retailer is even worse.

Between 2009 and 2013, Target's net income fell 21% from $2.5 billion to $2 billion. In all fairness, both revenue and net income declined for the year due to the fallout from a data breach that exposed tens of millions of customers; but even without this, the business' performance could have been better.

Where Target failed, Wal-Mart more than held its own. Over the past five years, Wal-Mart's management reported a 16% jump in revenue from $408.1 billion to $473.1 billion. For the most part, this rise in sales came from a 36% increase in the number of locations in operation, most of which came from the company's international segment.

Looking at profitability, Wal-Mart did better than Target, but far from amazing. Over the past five years, the company's net income rose 11.5% from $14.4 billion to $16 billion. Despite benefiting from higher sales, the company had to contend with higher costs in relation to those sales.

Probably the only impressive player when compared to Costco over the past five years has been Whole Foods. Between 2009 and 2013, the company's revenue soared an impressive 61% from $8 billion to $12.9 billion. This jump in sales was driven, in part, by a greater number of locations in operation but was also due to a track record of strong comparable-store sales growth.

In terms of net income growth, Whole Foods did even better. Over this time frame, the retailer saw its bottom line grow a jaw-dropping 275% from $146.8 million to $351 million. In addition to benefiting from higher sales, the company's net income rose as costs fell in relation to revenue.

Foolish takeaway
Heading into earnings, it's impossible to know how well Costco will perform. However, if the company's past is any indication of its future, then there is a good chance that the Foolish investor could find holding the company for the long term a good experience. When compared to rivals like Wal-Mart and Target, Costco looks particularly attractive, but it's possible that the strong performance demonstrated by Whole Foods may make it a better candidate for the Foolish investor.