NEW YORK (MarketWatch) — No. 1 membership-based warehouse club chain Costco Wholesale Corp. said Wednesday that its fiscal second-quarter profit rose 13%, after its cheaper gasoline and bulk purchases helped to drive budget-conscious shoppers both in the U.S. and overseas.

In an encouraging sign ahead of other retailers’ February sales results on Thursday, the Issaquah, Washington-based Costco said its February same-store sales rose 8%, topping analysts’ estimate of a 7.1% increase, Retail Metrics Data showed. Excluding the impact of gas sales, U.S. sales rose 7%, also exceeding analysts’ estimate. See related story on February retail sales on track for a solid gain.

Costco COST, +0.72% shares rose 1% as the broader retail market turned lower.

Translating Olympic innovations for the masses

Like other retailers, Costco has been contending with cost inflation in food and other products and whether to pass them on to shoppers against the backdrop of a still slow economic recovery and increased competition from rivals such as Wal-Mart Stores Inc.’s WMT, -0.08% Sam’s Club and BJ’s Wholesale Club. In November, Costco increased its membership fee for the first time in five years.

To make operations more efficient and profitable, the company has cut the number of its so-called stock-keeping-units from more than 4,100 items to under 3,800 in the last three to four years.

Costco’s gross margin narrowed by 0.3 percentage points, more than analysts expected, as it continued to lower prices and make what executives described as “price investment” to drive traffic and stay ahead of competition.

“It’s hard to fault the company for the margin investment as it has worked,” said Morgan Stanley analyst Mark Wiltamuth. “Costco was one of the sales winners through the holiday, and sales momentum has continued into February.”

For instance, while the company sells gasoline at below the market rate, hurting its margin, the strategy has helped it to bring traffic to stores.

“When prices rise we get more action,” said Chief Financial Officer Richard Galanti on a conference call with analysts. “We are on the news more. There is more frequency.”

As a case in point, while U.S. consumers’ gallon consumption has been down, Costco has seen it going up in the mid-single-digit rate, Galanti said.

“We are driving people into the parking lot,” Galanti said. “A portion of them come in to shop.”

Net income in the quarter ended Feb. 12 rose to $394 million, or 90 cents a share, from $348 million, or 79 cents, a year earlier.

Sales rose 10% to $22.51 billion. Including membership fees, total revenue also rose 10% to $23 billion. Comparable sales gained 8%, with both the U.S. and international unit each rising by the same percentage. Comparable sales excluding the impact of gasoline inflation and foreign currency translation were up 7% in the U.S. and 10% overseas.

Analysts surveyed by FactSet estimated profit of 88 cents a share on revenue of $22.7 billion.

“Best in class traffic and (comparable sales) reflect the strength of Costco low cost model and core upper income shopper,” said Greg Melich of ISI Group. But “Frequency gains come at a cost. Costco is winning trips and driving productivity consistent with its strategy. That said, a fourth straight quarter of gross margin erosion shows top line gains come at a cost.”