NEW YORK ( TheStreet) -- In a battle between the wholesalers, Costco ( COST) beats out BJ's ( BJ).

Granted, both companies do essentially the same thing: sell bulk items and discretionary merchandise at discount prices. But when you dig down, Costco just does it better.

Both retailers missed earnings expectations, sending shares down in pre-market trading. Still Costco has some favorable catalysts going forward.

During the quarter, Costco's membership fees increased 8.7% to $386 million, versus BJ's 3.6% jump to $46.3 million.

When it comes to gross margins, BJ's was flat year-over-year at 9.34%, missing consensus, while Costco posted gross margin of 10.67%, a growth of 20 basis points. What this shows is the difference between the retailers' sales mix, Wall Street Strategies analyst Brian Sozzi wrote in a note.

As a result, Sozzi says he is leaning toward maintaining his buy rating on Costco and reiterating his sell rating on BJ's.

" We believe Costco is at a point where it's positioned to return a strong amount of cash to shareholders either through a dividend increase or a buyback increase, or both," Sozzi wrote in a note. "Moreover, the company's business at the core appears to be a share gainer in a still up and down global retail market, with share gain not coming at the expense of margin erosion."

BJ's, on the other hand, is a slow growth company, Sozzi says. "It is currently cannibalizing its sales on the East Coast, it's too expensive for them to expand to the West Coast and they have no international expansion," he says.

The competition in food sector, which comprises 65% of BJ's business, is also heating up.

Costco said it earned $299 million, or 67 cents a share, in the second quarter, up from $239 million, or 55 cents a share, a year earlier. Excluding a charge of 3 cents a share related to a change in employee benefits.

Sales rose 11% to $18.36 billion. U.S. same-store sales in the period rose 5%, or 2% excluding gas inflation and foreign exchange. International same-store sales soared 26%, or 10% excluding gas and forex.

In comparison, BJ's earned $55.1 million or $1.01 a share, in its fourth quarter, a 5% increase from $52.7 million, or 91 cents, in the year-ago period. Excluding legal charges, BJ's actually earned 95 cents a share, a penny shy of Wall Street's forecast.

Sales grew 9% to $2.8 billion, while same-store sales jumped 4.6%.

Looking ahead, BJ's forecasts full-year earnings in the range of $2.54 to $2.64 a share, below Wall Street's outlook of $2.71 a share. For the first quarter, earnings are expected to fall between 40 cents and 45 cents a share. Analysts are calling for earnings of 44 cent.

-- Reported by Jeanine Poggi in New York.

Follow on Twitter and become a fan on Facebook.