Last Thursday, shares of Wal-Mart (NYSE:WMT), the world's largest retailer by market cap and sales, at $256.54 billion and $469.16 billion, respectively, rose slightly after it reported better-than-expected earnings per share. Despite this though, is it possible the company is coming under the threat of competitors like Costco (NASDAQ:COST) and Target (NYSE:TGT)? To find out, I compared the recent quarterly results of each company and arrived at some interesting conclusions.

Earnings beat but revenue was a disappointment
For the quarter, Wal-Mart clocked in sales of $115.69 billion. Although this result was 1.5% higher than the $113.93 billion it brought in during the same period a year ago, it's 1% lower than the $116.84 billion that Mr. Market expected. According to the company, revenue came up short primarily due to currency fluctuations. Without these fluctuations, it would have had sales of $116.2 billion.

On the flip side, the company did beat analyst expectations by a penny, with EPS coming in at $1.14. This represents a 6.5% increase from the $1.07 the company reported a year ago. Despite this beat, management estimated that yearly earnings would likely be between $5.01 and $5.11, just shy of the $5.20 Mr. Market was expecting.

Upon analyzing Wal-Mart's earnings release, I concluded that the rise in earnings was primarily attributable to two factors: margin improvement and fewer common shares outstanding. Margins weren't significantly different in any given area, but minor improvements, like cost of goods falling from 75.1% of sales to 74.9% of sales, were largely responsible. On top of that, the company saw its shares outstanding fall by 3.2%. Without fewer shares outstanding, earnings would have only risen to $1.11.

How does Wal-Mart stack up against Costco and Target?
In light of the company's lackluster quarter, I asked myself how it stands up against peers like Costco and Target. During its last quarter, Target saw its revenue rise by 2% to $17.1 billion, slightly beating Wal-Mart's growth rate. However, this increase in revenue came at a cost.

For the quarter, Target saw its net income fall by 13.2% to $611 million. This drop took place primarily due to its cost of goods sold rising to 68.6% of sales from 68% during the same quarter a year ago, combined with selling, general and administrative expenses rising to 21.6% of sales from 21.4%.

Looking at Costco, we see even more disappointing results. For its most-recent quarter, sales rose by 0.8% to $32.49 billion, nearly half of the growth rate that Wal-Mart experienced. Net income wasn't much better as it rose by only 1.3% on higher revenue and margin improvements to $617 million, compared to Wal-Mart's 2.8% improvement.

This relatively poor showing marks a big reversal from Costco's usual outstanding performance. While Wal-Mart has grown revenue and net income by 16% and 26.9%, respectively, over the past five years, Costco has crushed it with growth of 47.2% for revenue and 87.8% for net income.

Foolish takeaway
Based on the data above, you can see that, while Wal-Mart's performance this past quarter was less than ideal, it beat both Target and Costco. In the case of Costco, this is noteworthy because it suggests that, perhaps, it is beginning to slow down. This could signify harder times ahead or the chain, but may, instead, be nothing more than a bump in the road toward overtaking Wal-Mart as the world's largest retailer.

Irrespective of the future, Wal-Mart's performance this quarter firmly supports its spot as the largest retailer in the world. But, the Foolish investor should keep in mind that no matter how big you are, there is always someone out there trying to take you down. It is for this reason that I believe investors should keep a close eye on not only Wal-Mart, but on Target and Costco as well.

Daniel Jones has no position in any stocks mentioned. The Motley Fool recommends Costco Wholesale. The Motley Fool owns shares of Costco Wholesale. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.