• Second-quarter earnings beat estimates on expense control
  • Retailer trims store-opening goal as inventories surge

Cost-control is the new watchword at Hennes & Mauritz AB as the European fashion giant seeks to compensate for slowing sales growth, rising inventories and dwindling profitability.

The Swedish retailer on Thursday posted second-quarter earnings that exceeded analyst estimates, with the company’s efforts to contain expenses making the difference. Contending with a growing backlog of unsold clothing that will require greater markdowns, H&M trimmed its store-opening target and set a goal for online sales growth of at least 25 percent a year.

“The company has aggressively controlled operating costs,” Caroline Gulliver, an analyst at Jefferies, said in a note. “This is a marked change from H&M’s inability to cut like-for-like costs in the past.”

H&M’s shares were up 1.4 percent in Stockholm after initially rising as much as 5.7 percent. Investors have seen the value of their holdings dwindle as the company struggled to keep pace with competitors such as Zara owner Inditex SA, which has put a greater emphasis on e-commerce and has proved more adept…