You'll never truly know a company until you've measured it against its competitors. Whether you're pitting Coca-Cola (NYSE:KO) against PepsiCo, or FedEx (NYSE:FDX) opposite United Parcel Service (NYSE:UPS), a quick comparison can help to reveal an industry's best performers and most promising candidates.

Need proof? Let's see how BJ's Wholesale Club (NYSE:BJ) measures up against Costco (NASDAQ:COST):

Metric

BJ's Wholesale Club

Costco

Recent P/E

14

24

5-year P/E range

12-31

12-29

Return on Equity (ROE)

12.8%

11.3%

Long-term debt-to-equity

0.01

0.22

Market cap

$1.8 billion

$25.9 billion

Gross margin

12.4%

12.7%

Operating margin

2.2%

2.5%

Net profit margin

1.3%

1.5%

5-yr. revenue growth rate

6.5%

8.9%

5-yr. EPS growth rate

7.5%

6.9%

Dividend yield

N/A

1.2%

5-yr. annual dividend growth rate

N/A

23%

CAPS stars (out of five)

***

****

Data: Motley Fool CAPS, Yahoo! Finance, Morningstar.

What can we tell from those numbers? For starters:

  • BJ's appears more attractive from a valuation standpoint, with a lower P/E, and current levels closer to the bottom of its five-year range than Costco's. BJ's also has a much smaller market capitalization, suggesting that it has much more room to grow, while Costco is already bigger than Nike (NYSE:NKE) or General Mills (NYSE:GIS).
  • BJ's sports a marginally better return on equity and has less debt, though neither company is debt-heavy.
  • Costco has a slight edge in profit margins, though, and also in revenue growth. These two factors together can be a big deal. A company can improve its bottom line without boosting revenues, but only for so long. Bigger margins also mean that Costco is more effectively profiting from each dollar of sales. The net profit margin difference between the two isn't huge, but it still makes a difference, especially given Costco's bigger volume. If you look up the trends for these numbers, in general, they've been stagnant or slipping in recent years for both companies.

To many investors, Costco has the better reputation -- but clearly, BJ's looks impressive, too. Before you draw your own conclusions on the matter, consider diving into another comparison. You can gather opinions on both Costco and BJ's from fellow investors in our Motley Fool CAPS service, and learn why Costco has a better rating.